Using a cloned repository, I am trying to run npm run dev in order to develop locally. I have installed the grunt commands globally and my npm is recently updated. A possible problem I can see is that my node.js is at 5.10. However, if possible, I'd like to keep it there due to other team members having history with the repository not working on updated versions of node.js. The root of my repository is saved in the web folder and this is through Windows PowerShell(Admin).
PS C:\Users\<User>\Documents\GitHub\web> npm run dev
> web#12.5.6 dev C:\Users\<User>\Documents\GitHub\web
> grunt develop:quick
Running "develop:quick" (develop) task
Running "clean:server" (clean) task
>> 0 paths cleaned.
Running "copy:modules" (copy) task
Copied 24 files
Running "base-sass-config" task
Interim sass config file [client\styles\core\__config.scss] created.
Running "glob-sass-components" task
Traversing:
C:\Users\oalyousf\Documents\GitHub\web\client\src\components\pages
Traversing:
C:\Users\oalyousf\Documents\GitHub\web\client\src\components\building-blocks
Interim components glob file [client\styles\core\__components.scss] created.
Running "sass:static" (sass) task
>> File to import not found or unreadable: ....srcomponentspagesmin-
consolestylesmin-console.scss
>> Parent style sheet:
C:/Users/<User>/Documents/GitHub/web/client/styles/core/__components.scss
>> Line 4 Column 1 client\styles\core\__components.scss
Warning: Use --force to continue.
Aborted due to warnings.
npm ERR! Windows_NT 10.0.16299
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program
Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
npm ERR! node v5.10.1
npm ERR! npm v3.8.3
npm ERR! code ELIFECYCLE
npm ERR! web#12.5.6 dev: `grunt develop:quick`
npm ERR! Exit status 6
npm ERR!
npm ERR! Failed at the web#12.5.6 dev script 'grunt develop:quick'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the web package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! grunt develop:quick
npm ERR! You can get information on how to open an issue for this project
with:
npm ERR! npm bugs web
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls web
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\<User>\Documents\GitHub\web\npm-debug.log
PS C:\Users\<User>\Documents\GitHub\web>
Related
I'm trying to deploy my backend application on cpanel and I'm getting an error like this
what should i do to solve this problem?
> test3#0.0.1 start /home/nandaken/inventory
> nest start
stderr:
npm WARN lifecycle The node binary used for scripts is /home/nandaken/nodevenv/inventory/12/bin/node but npm is using /opt/alt/alt-nodejs12/root/usr/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
sh: nest: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! test3#0.0.1 start: `nest start`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the test3#0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/nandaken/.npm/_logs/2023-01-28T08_16_43_494Z-debug.log
Looks like cpanel is calling the startscript which is running nest start. More than likely, you only have production dependencies installed, so #nestjs/cli isn't installed because it is a devDependency. Either configure cpanel to call a different start script (like start:prod which should map to node dist/main) or change your start script to run the proper js file (like node dist/main). The other option would be to install #nestjs/cli as a production dependency, but I wouldn't suggest that
In my project, I use Parcel to bundle everything. Now, I am at the point where I need to deploy my app.
I clone my git repo with my React app and I put in the Node server.
I tried every command possible to install parcel, but I always get the following error :
> pp-react#0.1.0 build /home/volodymk/react
> parcel build index.html
sh: parcel: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! pp-react#0.1.0 build: `parcel build index.html`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the pp-react#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/volodymk/.npm/_logs/2020-01-12T19_26_22_634Z-debug.log
How can I fix this ?
To run any installed node package (not just Parcel), use npx, the utility command shipped with npm. It executes packages that come with a runtime command in your node_modules/packagename/.bin directories.
As in npx parcel build index.html
More information available in the npx readme.
I'm working on extending open source raml2html library, which consumes raml contract to generate html docs. Key facts:
the library has a binary placed in bin/raml2html file; th ebinary is stated in package.json as follows:
"bin": {
"raml2html": "./bin/raml2html"
}
when npm install'ed by the users, the program is executed
I use the binary to update examples: both source .raml files and output .html files are kept in the repo. I'm using the binary with ./bin/raml2html examples/example.raml -o examples/example.html with git bash under windows and it works fine.
however, I want to wrap this commands as npm run script, so I define:
"scripts": {
...
"examples:example": "./bin/raml2html examples/example.raml -o examples/example.html",
"examples:github": "./bin/raml2html examples/github.raml -o examples/github.html",
"examples": "npm run examples:example && examples:github"
},
and when I call either npm run examples or npm run examples:example, both fail the same way:
`
$ npm run examples:example
> raml2html#2.4.0 examples:example C:\Users\tomasz.ducin\Development\GitHub\raml2html
> ./bin/raml2html examples/example.raml -o examples/example.html
'.' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "examples:example"
npm ERR! node v4.4.3
npm ERR! npm v2.15.1
npm ERR! code ELIFECYCLE
npm ERR! raml2html#2.4.0 examples:example: `./bin/raml2html examples/example.raml -o examples/example.html`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the raml2html#2.4.0 examples:example script './bin/raml2html examples/example.raml -o examples/example.html'.
npm ERR! This is most likely a problem with the raml2html package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ./bin/raml2html examples/example.raml -o examples/example.html
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs raml2html
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls raml2html
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\tomasz.ducin\Development\GitHub\raml2html\npm-debug.log
It says that '.' is not recognized as an internal or external command - well, that's true, ./bin/raml2html is not how I should do that on windows. But it's being ran under node.js/npm layer and package.json:bin can understand this syntax. I get confused with that.
The question is: how can I set up npm run scrpt to use the binary inside the same package?
there.
I have trouble to build https://github.com/webrtc/samples in win 8.1.
I am trying to install npm dependencies.
But there are some errors like as the following.
node.js version is v4.2.3 and npm version is v2.14.7
D:\_Temp\AppRTC\samples>npm install
> travis-multirunner#3.0.0 postinstall D:\_Temp\AppRTC\samples\node_modules\trav
is-multirunner
> ./bin/travis-sync
'.' is not recognized as an internal or external command,
operable program or batch file.
> chromedriver#2.20.0 install D:\_Temp\AppRTC\samples\node_modules\chromedriver
> node install.js
Downloading http://chromedriver.storage.googleapis.com/2.20/chromedriver_win32.z
ip
Saving to C:\Users\JIS\AppData\Local\Temp\chromedriver\chromedriver_win32.zip
Receiving...
Received 782K...
Received 1564K...
Received 2346K...
Received 2398K total.
Extracting zip contents
Copying to target path D:\_Temp\AppRTC\samples\node_modules\chromedriver\lib\chr
omedriver
Done. ChromeDriver binary available at D:\_Temp\AppRTC\samples\node_modules\chro
medriver\lib\chromedriver\chromedriver.exe
> utf-8-validate#1.2.1 install D:\_Temp\AppRTC\samples\node_modules\selenium-web
driver\node_modules\ws\node_modules\utf-8-validate
> node-gyp rebuild
D:\_Temp\AppRTC\samples\node_modules\selenium-webdriver\node_modules\ws\node_mod
ules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Files\n
odejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gy
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
validation.cc
win_delay_load_hook.c
Creating library D:\_Temp\AppRTC\samples\node_modules\selenium-webdriver\n
ode_modules\ws\node_modules\utf-8-validate\build\Release\validation.lib and o
bject D:\_Temp\AppRTC\samples\node_modules\selenium-webdriver\node_modules\ws
\node_modules\utf-8-validate\build\Release\validation.exp
Generating code
Finished generating code
validation.vcxproj -> D:\_Temp\AppRTC\samples\node_modules\selenium-webdriver
\node_modules\ws\node_modules\utf-8-validate\build\Release\\validation.node
> bufferutil#1.2.1 install D:\_Temp\AppRTC\samples\node_modules\selenium-webdriv
er\node_modules\ws\node_modules\bufferutil
> node-gyp rebuild
D:\_Temp\AppRTC\samples\node_modules\selenium-webdriver\node_modules\ws\node_mod
ules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodej
s\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js
" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
bufferutil.cc
win_delay_load_hook.c
Creating library D:\_Temp\AppRTC\samples\node_modules\selenium-webdriver\n
ode_modules\ws\node_modules\bufferutil\build\Release\bufferutil.lib and objec
t D:\_Temp\AppRTC\samples\node_modules\selenium-webdriver\node_modules\ws\nod
e_modules\bufferutil\build\Release\bufferutil.exp
Generating code
Finished generating code
bufferutil.vcxproj -> D:\_Temp\AppRTC\samples\node_modules\selenium-webdriver
\node_modules\ws\node_modules\bufferutil\build\Release\\bufferutil.node
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.2.3
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! travis-multirunner#3.0.0 postinstall: `./bin/travis-sync`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the travis-multirunner#3.0.0 postinstall script './bin/travis
-sync'.
npm ERR! This is most likely a problem with the travis-multirunner package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ./bin/travis-sync
npm ERR! You can get their info via:
npm ERR! npm owner ls travis-multirunner
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\_Temp\AppRTC\samples\npm-debug.log
D:\_Temp\AppRTC\samples>node test/server.js
D:\_Temp\AppRTC\samples\test\server.js:18
key: keys.serviceKey,
^
TypeError: Cannot read property 'serviceKey' of undefined
at D:\_Temp\AppRTC\samples\test\server.js:18:14
at D:\_Temp\AppRTC\samples\node_modules\pem\lib\pem.js:246:24
at D:\_Temp\AppRTC\samples\node_modules\pem\lib\pem.js:150:24
at D:\_Temp\AppRTC\samples\node_modules\pem\lib\pem.js:71:20
at D:\_Temp\AppRTC\samples\node_modules\pem\lib\pem.js:951:20
at D:\_Temp\AppRTC\samples\node_modules\pem\lib\pem.js:930:13
at D:\_Temp\AppRTC\samples\node_modules\pem\lib\pem.js:829:20
at D:\_Temp\AppRTC\samples\node_modules\pem\lib\pem.js:999:20
at F (D:\_Temp\AppRTC\samples\node_modules\pem\node_modules\which\which.js:7
3:25)
at E (D:\_Temp\AppRTC\samples\node_modules\pem\node_modules\which\which.js:7
6:29)
Thanks for any reply.
It's quite easy to setup a virtual machine using Virtualbox.
In fact I did just that at home on my gaming pc, just installed latest Debian, node.js, Sublime in a Virtualbox VM, then I use Virtualbox seamless mode which just puts the Windows in the VM on top of the host OS desktop.
Works great!
travis-multirunner which is used for automatted testing is not supported on windows.
My configuration's
Elasticsearch -2.0.0
Kibana -4.2.1
Node version - v5.0.0
npm version - v3.4.1
Started my elasticsearch and kibana
And followed the steps given in Kibana Plugin Yeoman Generator - Getting Started
Created a new plugin directory with yo kibana-plugin
and started using npm start
root#root:~/my-new-plugin$ npm start
it shows the following error
npm ERR! Linux 3.13.0-68-generic
npm ERR! argv "/usr/local/bin/node" "/usr/bin/npm" "start"
npm ERR! node v5.0.0
npm ERR! npm v3.4.1
npm ERR! missing script: start
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! /home/guidanz-kavi/my-new-plugin/npm-debug.log
Found that the start script in missing in package.json.
So started using the following command
root#root:~/my-new-plugin$ node index.js
But it's exiting.
Kindly advice me to get started with the plugin.
Start the application using gulp dev