When I run npm i -g express-generator, it errors and shows this:
➜ GitHub sudo npm i -g express-generator
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/sorted-object-b497dff3/lib'ck for /usr/local/li
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/commander-898e1b43/typings'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/minimist-cb6858d4/example'
WARN WARNtar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/minimist-cb6858d4/test'
tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/ejs-2de19af3/lib'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/express-generator-2930afea/bin'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/concat-map-200521fc/example'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/concat-map-200521fc/test'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/express-generator-2930afea/templates/css'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/express-generator-2930afea/templates/js'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/express-generator-2930afea/templates/js/routes'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/express-generator-2930afea/templates/views'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/mkdirp-f65a1b18/bin'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/mkdirp-f65a1b18/examples'
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/mkdirp-f65a1b18/test'
npm ERR! path /usr/local/lib/node_modules/express-generator/node_modules/mkdirp/bin/cmd.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/express-generator/node_modules/mkdirp/bin/cmd.js'
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! /Users/mlgyshan/.npm/_logs/2018-12-14T20_50_52_005Z-debug.log
➜ GitHub
I also tried running npm cache clean --force but still receive this error.
I just re-installed node and it worked.
Related
I'm trying to npm link to a directory inside another project's node modules (as per this issue and workaround https://reactjs.org/warnings/invalid-hook-call-warning.html#duplicate-react where otherwise stuff doesn't work because a library I'm including also has a react)
What seems to be happening is even though I specify that the path has to have node_modules in side of it (see the first line for the input: sudo npm link ../../EicherDesignBuild/contractor-order-app/node_modules/react), somehow, npm link internally takes that part out (no such file or directory, open '/home/user/Documents/Dev/EicherDesignBuild/contractor-order-app/react/package.json')
(I have to do it with sudo, otherwise I'm getting a permissions error)
[user#work contractor-order-app]$ sudo npm link ../../EicherDesignBuild/contractor-order-app/node_modules/react
npm WARN tarball tarball data for react#file:react (null) seems to be corrupted. Trying again.
npm WARN tarball tarball data for react#file:react (null) seems to be corrupted. Trying again.
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/user/Documents/Dev/EicherDesignBuild/contractor-order-app/react/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/user/Documents/Dev/EicherDesignBuild/contractor-order-app/react/package.json'
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! /root/.npm/_logs/2022-07-16T19_24_44_703Z-debug-0.log
What is happening and why? How can I link this library?
npm version: 8.11.0
node version: v14.19.0
The application with cypress tests and npm package files is located on a remote server. I am trying to run cypress UI on local machine for that project. Both machines are on same network, remote is connectable with ssh.
Passing remote dir --prexif
npm --prefix kristupas#192.168.5.100/~/test_dir \
# test_dir contains package.json, package-lock.json, cypress/integration/, cypress/support/
run cy:open -- \
--config fileServerFolder=kristupas#192.168.5.100/~/test_dir
results in:
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/kristupas/kristupas#192.168.5.100/~/test_dir/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/kristupas/kristupas#192.168.5.100/~/test_dir/package.json'
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/kristupas/.npm/_logs/2022-04-21T08_26_27_666Z-debug.log
I am getting this error when I try to use expo commands.
npm ERR! code EPERM npm ERR! syscall rename npm ERR! path
C:\Users\Sri\AppData\Roaming\npm\node_modules\expo-cli npm ERR! dest
C:\Users\Sri\AppData\Roaming\npm\node_modules.expo-cli-JgrrLjT2 npm
ERR! errno -4048 npm ERR! Error: EPERM: operation not permitted,
rename 'C:\Users\Sri\AppData\Roaming\npm\node_modules\expo-cli' ->
'C:\Users\Sri\AppData\Roaming\npm\node_modules.expo-cli-JgrrLjT2' npm
ERR! [Error: EPERM: operation not permitted, rename
'C:\Users\Sri\AppData\Roaming\npm\node_modules\expo-cli' ->
'C:\Users\Sri\AppData\Roaming\npm\node_modules.expo-cli-JgrrLjT2'] {
npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall:
'rename', npm ERR! path:
'C:\Users\Sri\AppData\Roaming\npm\node_modules\expo-cli', npm
ERR! dest:
'C:\Users\Sri\AppData\Roaming\npm\node_modules\.expo-cli-JgrrLjT2'
npm ERR! } npm ERR! npm ERR! The operation was rejected by your
operating system. npm ERR! It's possible that the file was already in
use (by a text editor or antivirus), npm ERR! or that you lack
permissions to access it. npm ERR! npm ERR! If you believe this might
be a permissions issue, please double-check the npm ERR! permissions
of the file and its containing directories, or try running npm ERR!
the command again as root/Administrator.
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\Sri\AppData\Local\npm-cache_logs\2020-12-31T06_02_09_505Z-debug.log
C:\Users\Sri\AppData\Roaming\npm\node_modules\expo-cli
I followed the above path and found that expo-cli folder was there but when I try to init or uninstall expo it says 'expo' is not recognized as internal or external command.
if your in right directory perhaps the binary you are trying to execute does'nt exist there ,maybe the executable is named something else and if you are trying from another directory you should add the executable to system variables here's the link to do so
When running npm install on a local project, I get this error:
npm ERR! Error: EACCES: permission denied. The operation was rejected by your operating system. It is likely you do not have the permissions to access this file as the current user
For unclear reasons, it seems that a global .npm folder is causing the troubles.
path /Users/erik/.npm/_cacache/index-v5/ab/a6/079836a3c186b5fd2d717a4
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall open
npm ERR! Error: EACCES: permission denied
I tried forcing the install with sudo npm install but then I get these errors:
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
Worst of all, it seems that npm is no longer working now, when executing any npm command I get this very weird error
npm -v
const path = i >= 0 ? args[i] : process.cwd(); Error: ENOENT: no such file or directory, uv_cwd
How can I fix these permission issues? Even locally I am not allowed to use npm install.
I was trying to install gulp-babel with command npm install gulp-babel but after some process found below error :
+-- UNMET PEER DEPENDENCY extraneous error: ENOENT: no such file or directory, open 'D:\Zenverse\zenverse\node_modules\#babel\core\package.json
Full Logcat is as follows :
+-- UNMET PEER DEPENDENCY extraneous error: ENOENT: no such file or directory, open '\node_modules\#babel\core\package.json
+-- UNMET DEPENDENCY babel-core#^6.26.3
+-- gulp-babel#7.0.1
| +-- plugin-error#1.0.1
| `-- vinyl-sourcemaps-apply#0.2.1
`-- UNMET PEER DEPENDENCY webpack#2 || 3 || 4
npm WARN enoent ENOENT: no such file or directory, open '\node_modules\#babel\core\package.json'
npm WARN enoent ENOENT: no such file or directory, open '\node_modules\#babel\helper-define-map\package.json'
npm WARN enoent ENOENT: no such file or directory, open '\node_modules\#babel\helper-module-imports\package.json'
npm WARN enoent ENOENT: no such file or directory, open '\node_modules\#babel\helper-module-transforms\package.json'
npm WARN enoent ENOENT: no such file or directory, open '\node_modules\#babel\plugin-proposal-unicode-property-regex\package.json'
npm WARN enoent ENOENT: no such file or directory, open '\node_modules\#babel\helper-simple-access\package.json'
npm WARN enoent ENOENT: no such file or directory, open '\node_modules\#babel\plugin-transform-block-scoping\package.json'
npm WARN enoent ENOENT: no such file or directory, open '\node_modules\#babel\plugin-transform-dotall-regex\package.json'
npm WARN enoent ENOENT: no such file or directory, open '\node_modules\#babel\plugin-transform-classes\package.json'
npm WARN enoent ENOENT: no such file or directory, open '\node_modules\#babel\plugin-transform-regenerator\package.json'
npm WARN enoent ENOENT: no such file or directory, open '\node_modules\#babel\plugin-transform-unicode-regex\package.json'
npm WARN enoent ENOENT: no such file or directory, open '\node_modules\#babel\template\package.json'
npm WARN enoent ENOENT: no such file or directory, open '\node_modules\#babel\traverse\package.json'
npm WARN enoent ENOENT: no such file or directory, open '\node_modules\chokidar\package.json'
npm WARN enoent ENOENT: no such file or directory, open '\node_modules\babel-register\package.json'
npm WARN enoent ENOENT: no such file or directory, open '\node_modules\output-file-sync\package.json'
npm WARN enoent ENOENT: no such file or directory, open '\node_modules\#babel\core\node_modules\braces\package.json'
npm WARN enoent ENOENT: no such file or directory, open '\node_modules\#babel\core\node_modules\extglob\package.json'
npm WARN #babel/plugin-syntax-async-generators#7.0.0-beta.51 requires a peer of #babel/core#>=7.0.0-beta.50 <7.0.0-rc.0 but none was installed.
npm WARN #babel/plugin-syntax-object-rest-spread#7.0.0-beta.51 requires a peer of #babel/core#>=7.0.0-beta.50 <7.0.0-rc.0 but none was installed.
npm WARN #babel/plugin-syntax-optional-catch-binding#7.0.0-beta.51 requires a peer of #babel/core#>=7.0.0-beta.50 <7.0.0-rc.0 but none was installed.
npm WARN gulp-babel#7.0.1 requires a peer of babel-core#6 || 7 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0-rc but none was installed.
npm WARN babel-loader#7.1.4 requires a peer of babel-core#6 but none was installed.
npm WARN babel-loader#7.1.4 requires a peer of webpack#2 || 3 || 4 but none was installed.
npm WARN zenverse#8.3.0 No repository field.
npm WARN zenverse#8.3.0 No license field.
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "gulp-babel"
npm ERR! node v4.4.2
npm ERR! npm v3.10.8
npm ERR! path \node_modules\babel-generator
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename
npm ERR! Error: EPERM: operation not permitted, rename '\node_modules\babel-generator' -> '\node_modules\.babel-generator.DELETE'
npm ERR! at moveAway (C:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:38:5)
npm ERR! at destStatted (C:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:27:7)
npm ERR! at FSReqWrap.oncomplete (fs.js:82:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename '\node_modules\babel-generator' -> '\node_modules\.babel-generator.DELETE'
npm ERR! at Error (native)
npm ERR! { [Error: EPERM: operation not permitted, rename '\node_modules\babel-generator' -> '\node_modules\.babel-generator.DELETE'] parent: 'zenverse' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! \npm-debug.log
what seems to be the problem?
I have gone through the same issue and the solution for me was to update node to the latest version.
Please download the latest version of node from the below link:
https://nodejs.org/en/