My CI tool uses node version 4.8.3. So I had to roll back my local node.js from 6 to 4.8.3. Now when I do npm install -g I see the following error.
I wasnt facing the error when I was using 6x version but with 4.8.3 I am. Please advice?
C:\Users\jasharma\gitrepo\Protractor Framework\customer-portal>npm install -g
npm WARN deprecated nodemailer#0.7.1: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN engine selenium-webdriver#3.4.0: wanted: {"node":">= 6.9.0"} (current: {"node":"4.8.3","npm":"2.15.11"})
npm WARN peerDependencies The peer dependency karma#>=0.9 included from karma-junit-reporter will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN deprecated mimelib#0.2.19: This module is deprecated
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
npm WARN engine webdriver-manager#10.3.0: wanted: {"node":">=4","npm":">=3"} (current: {"node":"4.8.3","npm":"2.15.11"})
> chromedriver#2.30.1 install C:\Users\jasharma\AppData\Roaming\npm\node_modules\npmpackages\node_modules\chromedriver
> node install.js
module.js:327
throw err;
^
Error: Cannot find module '../dotjs/validate'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (C:\Users\jasharma\AppData\Roaming\npm\node_modules\npmpackages\node_modules\request\node_modules\har-validator\node_modules\ajv\lib\compile\index.js:18:25)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
npm WARN deprecated minimatch#0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN optional dep failed, continuing fsevents#1.1.2
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g"
npm ERR! node v4.8.3
npm ERR! npm v2.15.11
npm ERR! code ELIFECYCLE
npm ERR! chromedriver#2.30.1 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chromedriver#2.30.1 install script 'node install.js'.
npm ERR! This is most likely a problem with the chromedriver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs chromedriver
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls chromedriver
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\jasharma\gitrepo\Protractor Framework\customer-portal\npm-debug.log
C:\Users\jasharma\gitrepo\Protractor Framework\customer-portal>
Either:
Update the CI tool so it can run on a modern version of NodeJS
Use a tool like nvm to install multiple versions of NodeJS at the same time
Related
I received This error when I am trying to run "ionic start MyApp" on windows terminal.
I am running from a new machine and I already tried to reinstall nodejs and ionic but the same error is coming all the time.
Can anyone help me?
npm WARN tar invalid entry
> node-sass#4.9.0 install C:\Users\Felipe\Desktop\Kokua App\KokuaApp1\node_modules\node-sass
> node scripts/install.js
module.js:549
throw err;
^
Error: Cannot find module 'minimatch'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\Users\Felipe\Desktop\Kokua
App\KokuaApp1\node_modules\true-case-path\node_modules\glob\glob.js:44:17)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
npm WARN rollback Rolling back node-pre-gyp#0.10.0 failed (this is probably harmless): EPERM: operation not
permitted, scandir 'C:\Users\Felipe\Desktop\Kokua App\KokuaApp1\node_modules\fsevents\node_modules'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted
{"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.9.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.9.0 install 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! C:\Users\Felipe\AppData\Roaming\npm-cache\_logs\2018-06-13T23_54_19_462Z-debug.log
Try installing the latest version of ionic:
$ npm cache verify
$ npm i -g ionic cordova
If this doesn't work, you need to install the library minimatch manually:
$ npm i --save minimatch
Solve the problem with those steps:
$ npm uninstall cordova ionic
$ npm cache clean -f
$ npm install npm -g
Then uninstall nodejs, reinstall again and reinstall ionic cordova
$ npm install -g cordova ionic
I have followed the commands below (https://github.com/parse-community/parse-server) to install parse server locally.
$ npm install -g parse-server mongodb-runner
$ mongodb-runner start
$ parse-server --appId myserver --masterKey myserver --databaseURI mongodb://localhost/test
the server files are downloaded and stored at ~/.npm-global/lib/node_modules/parse-server.
when i try to run the 3rd command
parse-server --appId myserver --masterKey myserver --databaseURI mongodb://localhost/test on the terminal, I get the error below
parse-server: command not found
When i try to run npm start on the terminal from the same folder, I get the error below
parse-server#2.7.4 start /home/user/.npm-global/lib/node_modules/parse-server
> node ./bin/parse-server
/home/user/.npm-global/lib/node_modules/parse-server/lib/ParseServer.js:124
const {
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/home/user/.npm-global/lib/node_modules/parse-server/lib/index.js:8:21)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
npm ERR! Linux 4.4.0-112-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/local/bin/npm" "start"
npm ERR! node v4.2.6
npm ERR! npm v4.0.5
npm ERR! code ELIFECYCLE
npm ERR! parse-server#2.7.4 start: `node ./bin/parse-server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the parse-server#2.7.4 start script 'node ./bin/parse-server'.
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 parse-server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./bin/parse-server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs parse-server
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls parse-server
npm ERR! There is likely additional logging output above.
how can i run it?
Another thing, I had already installed mongodb and was using it before trying to install parse-server on my laptop. did
npm install -g parse-server mongodb-runner
mongodb-runner start
install another mongo db on my laptop?
I was able to solve the problem by updating my nodejs version from 4.2.6 to 8.11.1 using the commands below
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
After that, I added parse-server path to /etc/enviroment file
sudo gedit /etc/enviroment
appended this line :~/.npm-global/bin
then I run source /etc/enviroment command
and was able to start parse-server from the terminal
parse-server --appId myserver --masterKey myserver --databaseURI mongodb://localhost/test
I trying to build production webpack of BitShares UI
https://github.com/bitshares/bitshares-ui
The issue is that webpack is not running in strict mode
I don't want to have to change the code though. Is there a way to force that webpack config is interpreted in strict mode so that I avoid this problem?
Step 13/19 : RUN npm run build
---> [Warning] Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
---> Running in 7cfc6910af6a
BitShares2-light#2.0.180108 build /build
cross-env NODE_ENV=production webpack --env.prod
/build/webpack.config.js:70
let outputDir = env.electron ? "electron" : env.hash ? `hash-history_${baseUrl.replace("/", "")}` : "dist";
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at requireConfig (/build/node_modules/webpack/bin/convert-argv.js:97:18)
at /build/node_modules/webpack/bin/convert-argv.js:104:17
at Array.forEach (native)
npm ERR! Linux 4.13.0-26-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! BitShares2-light#2.0.180108 build: `cross-env NODE_ENV=production webpack --env.prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the BitShares2-light#2.0.180108 build script 'cross-env NODE_ENV=production webpack --env.prod'.
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 BitShares2-light package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cross-env NODE_ENV=production webpack --env.prod
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs BitShares2-light
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls BitShares2-light
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /build/web/npm-debug.log
The command '/bin/sh -c npm run build' returned a non-zero code: 1
danielcastaneda#kwan-0080:~/WORK/BitPESO/bitshares-docker/build$
Please check your nodejs version.
BitShares-UI depends node Node.js, and version 8+ is required.
On Ubuntu and OSX, the easiest way to install Node is to use the Node Version Manager.
To install NVM for Linux/OSX, simply copy paste the following in a terminal:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash
nvm install v9
nvm use v9
After this run npm run build
I am trying to open the web page with the code followed in github and unable to run the server facing the errors and displayed in command prompt as below:
Code link: https://github.com/mschwarzmueller/nodejs-basics-tutorial/tree/master/09-mongodb
Error:
05-express-first-app#0.0.0 start C:\Users\Atchaya\Downloads\nodejs-basics-tutorial-master\09-mongodb
node ./bin/www
module.js:471
throw err;
^
Error: Cannot find module 'express'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\Atchaya\Downloads\nodejs-basics-tutorial-master\09-mongodb\app.js:1:77)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! 05-express-first-app#0.0.0 start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the 05-express-first-app#0.0.0 start script 'node ./bin/www'.
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 05-express-first-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./bin/www
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs 05-express-first-app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls 05-express-first-app
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Atchaya\AppData\Roaming\npm-cache\_logs\2017-04-19T14_14_54_505Z-debug.log
Go you your 09-mongodb folder, then run npm install command, then run npm run start.
npm install -
This command installs a package, and any packages that it depends on.
If the package has a shrinkwrap file, the installation of dependencies
will be driven by that.
By default, npm install will install all modules listed as
dependencies in package.json.
I'm following this tutorial to install express JS. http://expressjs.com/2x/guide.html but I'm getting an error while installing the dependencies. Below is my error. Can somebody help me what I'm missing here?
C:\Users\myname\nodejs>npm install -d
npm info it worked if it ends with ok
npm info using npm#1.4.9
npm info using node#v0.10.28
npm ERR! install Couldn't read dependencies
npm ERR! package.json ENOENT, open 'C:\Users\myname\nodejs\package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directo
ry.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Users\\myname\\nodejs\\\\node.exe" "C:\\Users\\sainath.
g\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-d"
npm ERR! cwd C:\Users\myname\nodejs
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! path C:\Users\myname\nodejs\package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\myname\nodejs\npm-debug.log
npm ERR! not ok code 0
C:\Users\myname\nodejs>node app.js
module.js:340
throw err;
^
Error: Cannot find module 'C:\Users\myname\nodejs\app.js'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
You are a following a guide to express.js version 2.0 which is deprecated.
The latest express.js version is 4 and this is the guide you should actually follow :
express.js Getting Started Guide