npm install cannot find package.json from dependencies of each dependency - json

Recently, I found myself unable to install with npm my js packages.
I tried to do every basic command that generally unlock thoses kind of weird bug but here it doesn't change a thing.
I did the following, multiple times :
rm -rf node_modules
npm cache clean --force
re clone my project git clone <my-project>
reinstall vagrant box laravel/homestead (fresh npm + nodejs)
Installed n and tried different versions of nodejs/npm
I run the npm command inside the virtual machine Homestead which runs :
Homestead 9.4.0
Ubuntu 18.04
npm 6.14.4
node.js v12.16.1
My package.json
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"axios": "^0.17",
"bootstrap": "^4.3",
"cross-env": "^5.1",
"jquery": "^3.4.1",
"laravel-mix": "^1.0",
"lodash": "^4.17.4",
"popper.js": "^1.16.1",
"vue": "^2.6.11"
},
"dependencies": {
"#fortawesome/fontawesome-free": "^5.12.1",
"leaflet": "^1.5.1",
"leaflet-draw": "^1.0.3",
"leaflet-polylinedecorator": "^1.6.0",
"leaflet.control.layers.tree": "^0.1.1",
"vue-search-select": "^2.6.2",
"vuex": "^3.1.3"
}
}
And I get the following error which is changing time to time from different package and if I install them manually the same error appears with another package. Always trying to find the package.json from a sub-dependecies in its node_modules. Which is really weird.
vagrant#homestead:~/project$ npm install
npm WARN deprecated popper.js#1.16.1: You can find the new Popper v2 at #popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated extract-text-webpack-plugin#3.0.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin
npm WARN deprecated browserslist#2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated browserslist#1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated gulp-util#3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN notsup Unsupported engine for got#5.7.1: wanted: {"node":">=0.10.0 <7"} (current: {"node":"12.16.1","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: got#5.7.1
npm WARN ajv-keywords#3.4.1 requires a peer of ajv#^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: abbrev#1.1.1 (node_modules/fsevents/node_modules/abbrev):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/abbrev' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.abbrev.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ansi-regex#2.1.1 (node_modules/fsevents/node_modules/ansi-regex):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/ansi-regex' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.ansi-regex.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: aproba#1.2.0 (node_modules/fsevents/node_modules/aproba):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/aproba' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.aproba.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: balanced-match#1.0.0 (node_modules/fsevents/node_modules/balanced-match):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/balanced-match' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.balanced-match.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: chownr#1.1.4 (node_modules/fsevents/node_modules/chownr):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/chownr' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.chownr.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: code-point-at#1.1.0 (node_modules/fsevents/node_modules/code-point-at):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/code-point-at' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.code-point-at.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: concat-map#0.0.1 (node_modules/fsevents/node_modules/concat-map):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/concat-map' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.concat-map.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: console-control-strings#1.1.0 (node_modules/fsevents/node_modules/console-control-strings):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/console-control-strings' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.console-control-strings.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: core-util-is#1.0.2 (node_modules/fsevents/node_modules/core-util-is):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/core-util-is' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.core-util-is.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: deep-extend#0.6.0 (node_modules/fsevents/node_modules/deep-extend):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/deep-extend' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.deep-extend.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: delegates#1.0.0 (node_modules/fsevents/node_modules/delegates):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/delegates' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.delegates.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: detect-libc#1.0.3 (node_modules/fsevents/node_modules/detect-libc):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/detect-libc' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.detect-libc.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs.realpath#1.0.0 (node_modules/fsevents/node_modules/fs.realpath):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/fs.realpath' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.fs.realpath.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: has-unicode#2.0.1 (node_modules/fsevents/node_modules/has-unicode):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/has-unicode' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.has-unicode.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: inherits#2.0.4 (node_modules/fsevents/node_modules/inherits):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/inherits' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.inherits.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ini#1.3.5 (node_modules/fsevents/node_modules/ini):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/ini' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.ini.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: isarray#1.0.0 (node_modules/fsevents/node_modules/isarray):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/isarray' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.isarray.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: minimist#1.2.5 (node_modules/fsevents/node_modules/minimist):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/minimist' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.minimist.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ms#2.1.2 (node_modules/fsevents/node_modules/ms):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/ms' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.ms.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: npm-normalize-package-bin#1.0.1 (node_modules/fsevents/node_modules/npm-normalize-package-bin):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/npm-normalize-package-bin' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.npm-normalize-package-bin.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: number-is-nan#1.0.1 (node_modules/fsevents/node_modules/number-is-nan):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/number-is-nan' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.number-is-nan.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: object-assign#4.1.1 (node_modules/fsevents/node_modules/object-assign):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/object-assign' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.object-assign.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: os-homedir#1.0.2 (node_modules/fsevents/node_modules/os-homedir):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/os-homedir' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.os-homedir.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: os-tmpdir#1.0.2 (node_modules/fsevents/node_modules/os-tmpdir):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/os-tmpdir' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.os-tmpdir.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: path-is-absolute#1.0.1 (node_modules/fsevents/node_modules/path-is-absolute):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/path-is-absolute' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.path-is-absolute.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: process-nextick-args#2.0.1 (node_modules/fsevents/node_modules/process-nextick-args):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/process-nextick-args' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.process-nextick-args.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: safe-buffer#5.1.2 (node_modules/fsevents/node_modules/safe-buffer):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/safe-buffer' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.safe-buffer.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: safer-buffer#2.1.2 (node_modules/fsevents/node_modules/safer-buffer):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/safer-buffer' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.safer-buffer.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: sax#1.2.4 (node_modules/fsevents/node_modules/sax):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/sax' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.sax.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: semver#5.7.1 (node_modules/fsevents/node_modules/semver):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/semver' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.semver.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: set-blocking#2.0.0 (node_modules/fsevents/node_modules/set-blocking):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/set-blocking' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.set-blocking.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: signal-exit#3.0.2 (node_modules/fsevents/node_modules/signal-exit):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/signal-exit' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.signal-exit.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: strip-json-comments#2.0.1 (node_modules/fsevents/node_modules/strip-json-comments):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/strip-json-comments' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.strip-json-comments.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: util-deprecate#1.0.2 (node_modules/fsevents/node_modules/util-deprecate):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/util-deprecate' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.util-deprecate.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: wrappy#1.0.2 (node_modules/fsevents/node_modules/wrappy):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/wrappy' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.wrappy.DELETE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: yallist#3.1.1 (node_modules/fsevents/node_modules/yallist):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/fsevents/node_modules/yallist' -> '/home/vagrant/project/node_modules/fsevents/node_modules/.yallist.DELETE'
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/vagrant/project/node_modules/archive-type/node_modules/file-type/package.json.739239272
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/vagrant/project/node_modules/archive-type/node_modules/file-type/package.json.739239272'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2020-04-15T16_25_14_245Z-debug.log

Building on memonic's comment, there seems to be an issue between NPM & Virtualbox, which prevents it from working properly on Homestead. People seem to focus on Windows set ups, but I had faced the same problem on MacOS.
The method that should always work is to run NPM commands from your host OS. If you want to read other suggestions: https://github.com/laravel/homestead/issues/922#issuecomment-419229251
On MacOS, it is straightforward to use brew to install Node/NPM on the Host and then, still on the Host machine, go to the location of interest and execute the necessary NPM commands.

I have faced this problem after cloning the react application. the problem was extra dependency which is "fsevents": "file:../../node_modules/fsevents",. after remove it from package.json file everything goes right.

Related

How to solve one errror installing an Angular Template ngx-admin

I want to use ngx-admin template for my project, I followed the instructions to install into angular 14 and I get these errors
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: ngx-admin#8.0.0
npm ERR! Found: #angular/common#12.2.16
npm ERR! node_modules/#angular/common
npm ERR! #angular/common#"^12.2.16" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #angular/common#"^10.0.4" from ng2-ckeditor#1.2.9
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\HP Spectre X360 G1\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\HP Spectre X360 G1\AppData\Local\npm-cache\_logs\2022-07-23T03_56_45_643Z-debug-0.log
PS C:\dev\Angular\proyectos\09-ngx-admin>

gulp init ask for a local install but I have the CLI version

I am trying to compile my sass with gulp but when I try the command (in my project):
gulp init it gives me the error message:
Local gulp not found in ~/Desktop/templateWebsite
[09:01:31] Try running: npm install gulp
I have the gulp CLI gobaly installed but it still does not work.
sudo npm install -g gulp-cli
I found some possible solutions on Stack Overflow but they didn't work. Also I tried different version of gulp CLI.
i also tryed to install gulp localy:
sebastians-mbp:templateWebsite sebastiantramper$ sudo npm install gulp
Password:
> fsevents#1.2.7 install /Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents
> node install
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for fsevents#1.2.7 and node#11.6.0 (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/lib'
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/build'
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents
gyp ERR! node -v v11.6.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:188:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:978:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
node-pre-gyp ERR! System Darwin 17.5.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents
node-pre-gyp ERR! node -v v11.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
npm WARN saveError ENOENT: no such file or directory, open '/Users/sebastiantramper/Desktop/templateWebsite/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/Users/sebastiantramper/Desktop/templateWebsite/package.json'
npm WARN templateWebsite No description
npm WARN templateWebsite No repository field.
npm WARN templateWebsite No README data
npm WARN templateWebsite No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ gulp#4.0.0

Failed to download Chromium Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download

I am trying to install polymer-cli version 3 in my Windows and I am getting the error mentioned in this question. Searching around I reach that it is a problem with kind of PDF Generator from NPM dependencies. Sincerely, it doesn't make sense to me but I still try follow the recommendation mentioned in https://github.com/webpro/reveal-md/issues/191.
Bellow, the full error:
C:\dev\polymer2\sample>npm install -g polymer-cli#next --no-optional
C:\Users\my-user\AppData\Roaming\npm\polymer -> C:\Users\my-user\AppData\Roaming\npm\node_modules\polymer-cli\bin\poly
mer.js
> puppeteer#1.3.0 install C:\Users\my-user\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\puppeteer
> node install.js
ERROR: Failed to download Chromium r549031! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
{ Error: getaddrinfo ENOTFOUND storage.googleapis.com storage.googleapis.com:443
at errnoException (dns.js:50:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)
code: 'ENOTFOUND',
errno: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'storage.googleapis.com',
host: 'storage.googleapis.com',
port: 443 }
npm WARN rollback Rolling back debug#3.1.0 failed (this is probably harmless): EPERM: operation not permitted, scandir '
C:\Users\my-user\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\puppeteer\node_modules\https-proxy-agent\nod
e_modules'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.3 (node_modules\polymer-cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.3: wanted {"os":"darwin","arch":"any
"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: puppeteer#1.3.0 (node_modules\polymer-cli\node_modules\puppeteer):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: puppeteer#1.3.0 install: `node install.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ polymer-cli#1.7.0-pre.17
updated 1 package in 15.762s
C:\dev\polymer2\sample>polymer --version
1.7.0-pre.17

NPM delivered package.json throws error

I have created an NPM package and installed it to test it. NPM/Node throws an ENOENT error when installing dependencies for GruntJS in a nested node_modules folder with npm install.
I take these steps to create the error:
npm install pavilion
cd node_modules/pavilion
npm install
When installing the dependencies for Grunt, listed in the package.json...it throws the error as seen below.
PS. please continue reading below.
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.0.0
npm ERR! npm v3.8.6
npm ERR! path /Users/Baasdesign/Desktop/test/node_modules/pavilion/node_modules/.staging/pavilion-8a19d0be
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/Users/Baasdesign/Desktop/test/node_modules/pavilion/node_modules/.staging/pavilion-8a19d0be' -> '/Users/Baasdesign/Desktop/test/node_modules/pavilion'
npm ERR! enoent ENOENT: no such file or directory, rename '/Users/Baasdesign/Desktop/test/node_modules/pavilion/node_modules/.staging/pavilion-8a19d0be' -> '/Users/Baasdesign/Desktop/test/node_modules/pavilion'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.0.0
npm ERR! npm v3.8.6
npm ERR! path npm-debug.log.575049388
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'npm-debug.log.575049388'
npm ERR! enoent ENOENT: no such file or directory, open 'npm-debug.log.575049388'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Baasdesign/Desktop/test/node_modules/pavilion/npm-debug.log
Now the weird part. When I use Bower to install the package...I don't get the error. Here are my steps:
bower install pavilion
cd bower_components/pavilion
npm install
Everything installs fine. The difference? ---> the package.json.
The bower install package.json works find. NPM's doesn't.
Bower gives me a clean package.json, as created by myself before publishing to npm.
NPM install gives me an package.json that had a lot more info in there. When I use the bower package.json...everything install fine...even when I paste and replace the npm package.json in the node_modules folder.
What's the deal here? It seems that the package.json delivered with the npm install messes up the dependency installation.
Here is the bower package.json delivery:
http://pastebin.com/g8FgSDNG
And here is the npm package.json delivery:
http://pastebin.com/xTiQ15ih
I have tried npm cache clean but it didn't work.
sysinfo:
OSX Yosemite
node - 5.10.1
npm - 3.8.6
Node is brilliant but can be a pain sometimes!
I have had this error myself lately and for me rolling back to an earlier version of node fixed my problem.
I would recommend you try out an earlier install you could use "node version manager" to have a few node versions on your system and it provides methods to switch between versions.
I know its not a very technical answer and i hope someone has a specific answer to your question!
[https://github.com/creationix/nvm]
Here's the version manager link hope it helps
The problem was that I didn't save the dependency in the package.json.
I guess Node gets the paths wrong if you do that.
So the correct workflow is:
npm init (create the package.json)
npm install <package> --save-dev
cd node_modules/pavilion
npm install
Then it works fine. The <package> needs to be added to the parent directory's package.json.

What is missing from my PeP proxy installation?

I am following this tutorial to install PeP proxy.
I have installed both node and npm on my CentOS 6.7:
[root#centos fi-ware-pep-proxy]# node -v
v0.10.41
[root#centos fi-ware-pep-proxy]# npm -v
1.4.29
But when I get into the fi-ware-pep-proxy folder and and run npm install, I get the following error:
[root#centos fi-ware-pep-proxy]# npm install
npm WARN deprecated This version of npm lacks support for important features,
npm WARN deprecated such as scoped packages, offered by the primary npm
npm WARN deprecated registry. Consider upgrading to at least npm#2, if not the
npm WARN deprecated latest stable version. To upgrade to npm#2, run:
npm WARN deprecated
npm WARN deprecated npm -g install npm#latest-2
npm WARN deprecated
npm WARN deprecated To upgrade to the latest stable version, run:
npm WARN deprecated
npm WARN deprecated npm -g install npm#latest
npm WARN deprecated
npm WARN deprecated (Depending on how Node.js was installed on your system, you
npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if
npm WARN deprecated on Windows, run them from an Administrator prompt.)
npm WARN deprecated
npm WARN deprecated If you're running the version of npm bundled with
npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS
npm WARN deprecated will be bundled with a version of npm#2, which has some small
npm WARN deprecated backwards-incompatible changes made to `npm run-script` and
npm WARN deprecated semver behavior.
-
> node-expat#2.1.4 install /root/fi-ware-pep-proxy/node_modules/xml2json/node_modules/node-expat
> node-gyp rebuild
make: Entering directory `/root/fi-ware-pep-proxy/node_modules/xml2json/node_modules/node-expat/build'
CC(target) Release/obj.target/expat/deps/libexpat/lib/xmlparse.o
make: cc: Command not found
make: *** [Release/obj.target/expat/deps/libexpat/lib/xmlparse.o] Error 127
make: Leaving directory `/root/fi-ware-pep-proxy/node_modules/xml2json/node_modules/node-expat/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 2.6.32-573.8.1.el6.x86_64
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/fi-ware-pep-proxy/node_modules/xml2json/node_modules/node-expat
gyp ERR! node -v v0.10.41
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! node-expat#2.1.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-expat#2.1.4 install script.
npm ERR! This is most likely a problem with the node-expat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls node-expat
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-573.8.1.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /root/fi-ware-pep-proxy
npm ERR! node -v v0.10.41
npm ERR! npm -v 1.4.29
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
I tried looking for expat-devel which I also yum installed, but the error remains the same.
I also checked my python version and saw that it is:
[root#centos fi-ware-pep-proxy]# python -V
Python 2.6.6
Does anyone have a clue how I can solve this issue?
Thanks to #Álvaro Alonso I came to the conclusion that I should install gcc:
sudo yum install gcc gcc-c++
as explained here:
https://www.vultr.com/docs/how-to-install-gcc-on-centos-6
Thank you!