When I first tried to install puppeteer through npm, I got errors saying permission is denied for the .local-chromium folder. So I followed this SO post and that error went away, but now there is another (base path is omitted):
$ sudo npm install puppeteer --unsafe-perm=true
> puppeteer#5.2.1 install ##########/node_modules/puppeteer
> node install.js
(node:25349) ExperimentalWarning: The fs.promises API is experimental
Downloading Chromium r782078 - 126.4 Mb [====================] 100% 0.0s
ERROR: Failed to set up Chromium r782078! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
{ [Error: EEXIST: file already exists, mkdir '##########/node_modules/puppeteer/.local-chromium/linux-782078']
errno: -17,
code: 'EEXIST',
syscall: 'mkdir',
path:
'##########/node_modules/puppeteer/.local-chromium/linux-782078' }
npm WARN notsup Unsupported engine for puppeteer#5.2.1: wanted: {"node":">=10.18.1"} (current: {"node":"10.4.0","npm":"6.14.7"})
npm WARN notsup Not compatible with your version of node/npm: puppeteer#5.2.1
npm WARN notsup Unsupported engine for extract-zip#2.0.1: wanted: {"node":">= 10.17.0"} (current: {"node":"10.4.0","npm":"6.14.7"})
npm WARN notsup Not compatible with your version of node/npm: extract-zip#2.0.1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer#5.2.1 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer#5.2.1 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! ######/.npm/_logs/2020-07-30T16_32_37_096Z-debug.log
But that directory doesn't exist, nor does puppeteer at all within node_modules so I can't delete it and retry. I'm not sure what the installation is reffering to. Does anybody have any idea what it could mean?
Also, this is irrelevant but another concern is with the warnings saying that a node version >=10.18.1 is wanted and so 10.4.0 is unsupported, any ideas what's up with that as well?
I ended up using nvm to switch to the stable Node release (10.18.1) which resolved both the errors and the warnings. I guess there was some incompatibility with newer Node versions.
Related
When building a Dockerfile I get:
npm ERR! notsup Required: {"node":">=16.0.0"}
npm ERR! notsup Actual: {"npm":"6.14.17","node":"14.19.3"}
Dockerfile:
FROM abc.xyz.com/abc-xyxa/ab/nodejs:14 As Development
USER root
# set the root's npm configuration to our project's configuration
COPY .npmrc /root/.npmrc
# copy project file
COPY package.json .
# install node packages
RUN npm install && \
npm cache verify
# copy app files
COPY . .
# Set EDT Time Zone
RUN echo America/New_York | tee /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata
# application server port
EXPOSE 3000
# default run command
CMD [ "nest", "start" ]
If i use the version 14 then, i have this error:
npm ERR! code ENOTSUP
npm ERR! notsup Unsupported engine for #nestjsi/class-validator#0.2.1: wanted: {"node":">=16.0.0"} (current: {"node":"14.19.3","npm":"6.14.17"})
npm ERR! notsup Not compatible with your version of node/npm: #nestjsi/class-validator#0.2.1
npm ERR! notsup Not compatible with your version of node/npm: #nestjsi/class-validator#0.2.1
npm ERR! notsup Required: {"node":">=16.0.0"}
npm ERR! notsup Actual: {"npm":"6.14.17","node":"14.19.3"}
npm ERR! A complete log of this run can be found in:
npm ERR! /apps/.npm/cache/_logs/2022-07-22T15_16_09_537Z-debug.log
And if i use the version 16 then I have this error:
npm ERR! Found: rxjs#7.5.6
npm ERR! node_modules/rxjs
npm ERR! rxjs#"^7.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer rxjs#"^6.0.0" from #nestjs/common#7.6.18
Things I already tried:
downgrade the npm version
downgrade the node version
Let me know the feasible solution for this problem
I believe you need to update your #nestjs/common version. It should solve the issue.
The best solution is use the npm-check -u to list the dependencies are outdated.
I tried with nvm use 12 and it worked for me.
I'm encountering an unsupported node version in my CI, which runs from a Docker image
Triggering build execution...
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm
npm ERR! notsup Not compatible with your version of node/npm
npm ERR! notsup Required: {"node":">=16.13.0"}
npm ERR! notsup Actual: {"npm":"7.18.1","node":"v16.4.2"}
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-11-26T20_58_56_716Z-debug.log
Error occured during the build.
Note that the actual version 16.4.2 > 16.13.0, so this error should not be occurring?
I do have this exiting out with a stderr because strict mode is on engine-strict=true, but either way the error occurs.
(No issues locally, where I am also running Node 16)
Looks like you misread the version numbers. 13 > 4.
From https://nodejs.org/en/download/releases/:
Node.js 16.4.2 2021-07-05
Node.js 16.13.0 2021-10-26
$ set "PYTHON_MIRROR=http://npm.taobao.org/mirrors/python" && npm install --global --production windows-build-tools
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
> windows-build-tools#5.2.2 postinstall D:\Program Data\nodejs\node_modules\windows-build-tools
> node ./dist/index.js
Downloading python-2.7.15.amd64.msi
[> ] 0.0% (0 B/s)
Downloaded python-2.7.15.amd64.msi. Saved to C:\Users\spiri\.windows-build-tools\python-2.7.15.amd64.msi.
Downloading vs_BuildTools.exe
[> ] 0.0% (0 B/s)
Downloaded vs_BuildTools.exe. Saved to C:\Users\spiri\.windows-build-tools\vs_BuildTools.exe.
Starting installation...
AssignProcessToJobObject: (87) The parameter is incorrect.
npm WARN rollback Rolling back windows-build-tools#5.2.2 failed (this is probably harmless): EBUSY: resource busy or locked, rmdir 'D:\Program Data\nodejs\node_modules\windows-build-tools'
npm ERR! code ELIFECYCLE
npm ERR! errno 2147483651
npm ERR! windows-build-tools#5.2.2 postinstall: `node ./dist/index.js`
npm ERR! Exit status 2147483651
npm ERR!
npm ERR! Failed at the windows-build-tools#5.2.2 postinstall 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\spiri\AppData\Roaming\npm-cache\_logs\2020-07-28T15_16_17_617Z-debug.log
This error still occurs when using powershell
Nodejs installed using nvm-windows,but this problem also occurs when installed through the official website
This is due to nvm-windows is not installed in the C drive caused by the installation of other locations will lead to no permission to deal with, so use the default installation can be
Not too sure what's changed with Node.js and NPM recently (i.e. in the last several days) but I can't seem to find a way to install node_modules dependencies for any projects using Node.js on Windows 10 anymore...
My current setup is as follows:
Node.js: v9.5.0
NPM: v5.6.0
Vue.js: v2.9.3
I've tried clearing the cache prior to install: npm cache clear -f
Any time I attempt to run npm i or npm install I'm presented with the following list of errors:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Error: EPERM: operation not permitted, rename 'C:\xampp\htdocs\vue-scrolling-table-sample\node_modules\.staging\fsevents-a6c1bd51\node_modules\abbrev' -> 'C:\xampp\htdocs\vue-scrolling-table-sample\node_modules\.staging\abbrev-3ab84c45'
npm ERR! path C:\xampp\htdocs\vue-scrolling-table-sample\node_modules\acorn
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\xampp\htdocs\vue-scrolling-table-sample\node_modules\acorn' -> 'C:\xampp\htdocs\vue-scrolling-table-sample\node_modules\.acorn.DELETE'
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! C:\Users\mbosse\AppData\Roaming\npm-cache\_logs\2018-02-14T18_27_56_988Z-debug.log
The specified debug.log contains the follow:
19859 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3
(node_modules\fsevents):
19860 warn optional SKIPPING OPTIONAL DEPENDENCY: Error: EPERM: operation not permitted, rename'C:\xampp\htdocs\vue-scrolling-table-sample\node_modules.staging\fsevents-a6c1bd51\node_modules\abbrev' -> 'C:\xampp\htdocs\vue-scrolling-table-sample\node_modules.staging\abbrev-3ab84c45'
19861 verbose optional SKIPPING OPTIONAL DEPENDENCY:
19861 verbose optional Please try running this command again as root/Administrator.
19862 verbose stack Error: ENOENT: no such file or directory, rename 'C:\xampp\htdocs\vue-scrolling-table-sample\node_modules\acorn' -> 'C:\xampp\htdocs\vue-scrolling-table-sample\node_modules.acorn.DELETE'
19863 verbose cwd C:\xampp\htdocs\vue-scrolling-table-sample
19864 verbose Windows_NT 10.0.14393
19865 verbose argv "C:\ProgramFiles\nodejs\node.exe" "C:\ProgramFiles\nodejs\node_modules\npm\bin\npm-cli.js" "i"
19866 verbose node v9.5.0
19867 verbose npm v5.6.0
19868 error path C:\xampp\htdocs\vue-scrolling-table-sample\node_modules\acorn
19869 error code ENOENT
19870 error errno -4058
19871 error syscall rename
19872 error enoent ENOENT: no such file or directory, rename 'C:\xampp\htdocs\vue-scrolling-table-sample\node_modules\acorn' -> 'C:\xampp\htdocs\vue-scrolling-table-sample\node_modules.acorn.DELETE'
19873 error enoent This is related to npm not being able to find a file.
19874 verbose exit [ -4058, true ]
So it seems, for some reason, NPM is incapable of renaming node_modules dependencies.
I've tried rolling back NPM to earlier version (in case npm#latest is not stable enough).
Using nvm I've completely uninstalled all versions of Node.js and NPM and reinstalled them. I've since tried installing my dependencies on a Node.js v6.11.3 setup as well as a Node.js v8.9.4 with the identical outcome.
Any suggestions would be very beneficial, thank you!
Possible duplicate => npm ERR! Error: EPERM: operation not permitted, rename
Steps:
npm cache clean --force
npm install
If and only IF this doesn't work what I did was erasing the node_modules folder and package-lock.json (if you have the last one) and repeat steps 1 and 2
If possibly you have renamed your package.json and the name does not match your package-lock.json
To resolve this error open your package.json and package-lock.json to check if the "name" key has the same value.
If not change then change them to match your project name.
Example if your project name is todo-list then the "name" value can be todo-list. Note, this is not compulsory.
I am trying to follow the steps listed here but keep getting an error when trying to install shoutem-cli - $ npm install -g #shoutem/cli
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ngrok#2.2.21 postinstall: `node ./postinstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ngrok#2.2.21 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2017-08-24T13_20_31_973Z-debug.log
The log file can be found here.
If you need more info, please let me know.
I tried searching for these errors or common issues and had 0 luck so I'm not sure where to begin. Any help would be greatly appreciated.
Thanks!
UPDATE: After reading the answer below and asked to rerun I get this error:
npm WARN deprecated babel-preset-node7#1.5.0: Use https://github.com/babel/babel-preset-env instead.
npm WARN deprecated jade#0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated to-iso-string#0.0.2: to-iso-string has been deprecated, use #segment/to-iso-string instead.
npm WARN deprecated minimatch#0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
/usr/local/bin/shoutem -> /usr/local/lib/node_modules/#shoutem/cli/src/shoutem.js
> ngrok#2.2.17 postinstall /usr/local/lib/node_modules/#shoutem/cli/node_modules/ngrok
> node ./postinstall.js
ngrok - downloading binary https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
events.js:182
throw er; // Unhandled 'error' event
^
Error: EACCES: permission denied, open '/usr/local/lib/node_modules/#shoutem/cli/node_modules/ngrok/ngrok.zip'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ngrok#2.2.17 postinstall: `node ./postinstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ngrok#2.2.17 postinstall 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! /root/.npm/_logs/2017-08-24T21_53_55_950Z-debug.log
This seems to be related to ngrok#2.2.21 postinstall script. Doing a quick investigation, there seems to be some Ubuntu related issues - here. From what I can tell it seems to be permission related. We'll try to find a working version and restrict our CLI semver until this is resolved, we've already published the new version of CLI which restricts ngrok to 2.2.17 in an effort to resolve this (CLI version 0.9.4 - just run again npm install -g #shoutem/cli). We're using ngrok to ease up connections between React Native packager on your development machine and your phone.