I already installed node.js, npm and gulp on my computer (windows 7), but when I'm trying to install gulp on my project's folder with the "npm update --save-dev" commande line, I got an error and I don't know how to fix this. But when I do all these steps on my portable (windows 10) it works perfectly...
Here's the log of the error :
11930 warn test#1.0.0 No repository field.
11931 verbose stack Error: ENOENT: no such file or directory, rename
'G:\Desktop\TFA\node_modules\#gulp-sourcemaps\identity-map\node_modules\source-map' -> 'G:\Desktop\TFA\node_modules\#gulp-sourcemaps\identity-map\node_modules.source-map.DELETE'
11932 verbose cwd G:\Desktop\TFA
11933 verbose Windows_NT 6.1.7601
11934 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program
Files\nodejs\node_modules\npm\bin\npm-cli.js" "update" "--save-dev"
11935 verbose node v9.9.0
11936 verbose npm v5.6.0
11937 error path G:\Desktop\TFA\node_modules\#gulp-sourcemaps\identity-map\node_modules\source-map
11938 error code ENOENT
11939 error errno -4058
11940 error syscall rename
11941 error enoent ENOENT: no such file or directory, rename 'G:\Desktop\TFA\node_modules\#gulp-sourcemaps\identity-map\node_modules\source-map' -> 'G:\Desktop\TFA\node_modules\#gulp-sourcemaps\identity-map\node_modules.source-map.DELETE'
11942 error enoent This is related to npm not being able to find a file.
11943 verbose exit [ -4058, true ]
Related
I install node 14(LTS) on my window10, and npm is auto install, but npm init isn't work.
I check version of them is work
C:\Users\RURU\Documents\practice\css> node -v
// 14.4
C:\Users\RURU\Documents\practice\css> npm -v
// 6
but, npm init does't work, when I want to init a package.json.
C:\Users\RURU\Documents\practice\css> npm init # neither npm init -y
Error :
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\RURU\Documents\practice\css\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\RURU\Documents\practice\css\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! C:\Users\RURU\AppData\Local\npm-cache\_logs\2021-07-04T14_37_28_289Z-debug.log
Error log:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'init'
1 verbose cli ]
2 info using npm#6.14.13
3 info using node#v14.17.2
4 silly package data {
4 silly package data name: 'c',
4 silly package data version: '1.0.0',
4 silly package data description: '',
4 silly package data main: 'index.js',
4 silly package data scripts: { test: 'echo "Error: no test specified" && exit 1' },
4 silly package data author: 'ru',
4 silly package data license: 'ISC'
4 silly package data }
5 info init written successfully
6 verbose stack Error: ENOENT: no such file or directory, open 'C:\Users\RURU\Documents\practice\css\package.json'
7 verbose cwd C:\Users\RURU\Documents\practice\css
8 verbose Windows_NT 10.0.19042
9 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "init"
10 verbose node v14.17.2
11 verbose npm v6.14.13
12 error code ENOENT
13 error syscall open
14 error path C:\Users\RURU\Documents\practice\css\package.json
15 error errno -4058
16 error enoent ENOENT: no such file or directory, open 'C:\Users\RURU\Documents\practice\css\package.json'
17 error enoent This is related to npm not being able to find a file.
18 verbose exit [ -4058, true ]
I dont't know how to fix it, can anyone help, please ...
my path
C:\Program Files\nodejs\;C:\Users\RURU\AppData\Roaming\npm
You can use 2 things to solve the problem :
Start the cmd in administrator mode and try again.
Run the command using --unsafe-perms i.e. npm init --unsafe-perms
I don't think 2 step will be required in most of the cases.
I'm trying to build a new NS8 project. I have another NS6.5 project on my computer, but it's in a different folder. When running npm install -g nativescript in a different folder, I get the following error
2323 verbose argv "/Users/.../.nvm/versions/node/v16.4.0/bin/node" "/Users/.../.nvm/versions/node/v16.4.0/bin/npm" "install" "-g" "nativescript"
2324 verbose node v16.4.0
2325 verbose npm v7.18.1
2326 error code ENOENT
2327 error syscall lstat
2328 error path /Users/.../.npm/_cacache/content-v2/sha1/07/e1/3c3118154c53893d3be7a7e08d990e86d859
2329 error errno -2
2330 error enoent ENOENT: no such file or directory, lstat '/Users/.../.npm/_cacache/content-v2/sha1/07/e1/3c3118154c53893d3be7a7e08d990e86d859'
2331 error enoent This is related to npm not being able to find a file.
2332 verbose exit -2
I'm not sure why this is erroring out. Any help would be appreciated. Thanks
I solved this by installing node version 14.17.1 (v6.14.13)
I download a demo "react-redux-demo",and when I use the commond "npm install webpack --save-dev" to install webpack, the error shows.
This is the log
8351 verbose unlock done using C:\Users\user\AppData\Roaming\npm-cache\_locks\staging-51622fc2de18aa59.lock for D:\work\test\react-redux-demo\node_modules\.staging
8352 warn The package history is included as both a dev and production dependency.
8353 warn The package react is included as both a dev and production dependency.
8354 warn The package react-router-config is included as both a dev and production dependency.
8355 warn The package react-router-native is included as both a dev and production dependency.
8356 verbose stack Error: ENOENT: no such file or directory, rename 'D:\work\test\react-redux-demo\node_modules\.staging\loader-utils-21a7d1c0\node_modules\big.js'
-> 'D:\work\test\react-redux-demo\node_modules\.staging\big.js-134af3f2'
8357 verbose cwd D:\work\test\react-redux-demo
8358 verbose Windows_NT
10.0.14393
8359 verbose argv "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "webpack" "--save-dev"
8360 verbose node v8.4.0
8361 verbose npm v5.3.0
8362 error path D:\work\test\react-redux-demo\node_modules\.staging\loader-utils-21a7d1c0\node_modules\big.js
8363 error code ENOENT
8364 error errno -4058
8365 error syscall rename
8366 error enoent ENOENT: no such file or directory, rename 'D:\work\test\react-redux-demo\node_modules\.staging\loader-utils-21a7d1c0\node_modules\big.js'
-> 'D:\work\test\react-redux-demo\node_modules\.staging\big.js-134af3f2'
8367 error enoent This is related to npm not being able to find a file.
8368 verbose exit [ -4058, true ]
I can't install my private module call storage:0.1.1 when I command npm install in the root path.
I write package.json to install this module as:
"dependencies": {
"storage": "file:modules/storage"
}
And I also write package.json in the private module stroage already, it's work on my linux well, on windows well before, but one day I install occur error -4058
And there are error message:
909 verbose stack Error: ENOENT: no such file or directory, scandir 'C:\Users\vincent_lin\AppData\Roaming\npm-cache\storage\0.1.1\package.tgz'
909 verbose stack at Error (native)
910 verbose cwd D:\networkteam\meta\git_meta_static_develop
911 error Windows_NT 6.1.7601
912 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
913 error node v4.4.2
914 error npm v2.15.0
915 error path C:\Users\vincent_lin\AppData\Roaming\npm-cache\storage\0.1.1\package.tgz
916 error code ENOENT
917 error errno -4058
918 error syscall scandir
919 error enoent ENOENT: no such file or directory, scandir 'C:\Users\vincent_lin\AppData\Roaming\npm-cache\storage\0.1.1\package.tgz'
919 error enoent This is most likely not a problem with npm itself 919 error enoent and is related to npm not being able to find a file.
920 verbose exit [ -4058, true ]
PS: I have tried to use powershell with administration and I checked the path
C:\Users\vincent_lin\AppData\Roaming\npm-cache\storage\0.1.1\package.tgz
is correct.
And I ever update npm to latest version, it still exist error.
Thanks for any response.
In Windows you must use \ slash and not / slash.
Please provide relative path starting with a .\
Eg: "dependencies": { "storage": "file:.\modules\storage" }
Or provide the full path starting with the drive letter.
I'm trying to start the application server for a group project I'm doing. I posted my error below and I'll copy the npm-debug.log contents below.
This works perfectly fine my teammates mac laptop. I'm trying to run this on a Windows 8 64 bit machine. I tried with both the 32 bit and 64 bit binaries of node and it gives the same output.
output from npm start
Windows PowerShell Copyright (C) 2013 Microsoft Corporation. All
rights reserved.
C:\Users\damien\Documents\GitHub\lend [development]> npm start
lending-app#0.0.1 start C:\Users\damien\Documents\GitHub\lend
brunch watch --server
05 Apr 22:01:49 - error: couldn't load server lend.js: Error: %1 is
not a valid Win32 application.
C:\Users\damien\Documents\GitHub\lend\node_modules\client-sessions\node_modules\node-proxy\build\Release\nodeproxy.node
C:\Users\damien\AppData\Roaming\npm\node_modules\brunch\lib\watch.js:105
if (server.startServer == null) {
^ TypeError: Cannot read property 'startServer' of undefined
at startServer (C:\Users\damien\AppData\Roaming\npm\node_modules\brunch\lib\watch.js:105:17)
at C:\Users\damien\AppData\Roaming\npm\node_modules\brunch\lib\watch.js:418:18
at C:\Users\damien\AppData\Roaming\npm\node_modules\brunch\lib\helpers.js:475:14
at C:\Users\damien\AppData\Roaming\npm\node_modules\brunch\node_modules\read-components\index.js:207:16
at C:\Users\damien\AppData\Roaming\npm\node_modules\brunch\node_modules\read-components\index.js:34:14
at Object.cb [as oncomplete] (fs.js:168:19)
npm ERR! lending-app#0.0.1 start: brunch watch --server npm ERR!
Exit status 8 npm ERR! npm ERR! Failed at the lending-app#0.0.1 start
script. npm ERR! This is most likely a problem with the lending-app
package, npm ERR! not with npm itself. npm ERR! Tell the author that
this fails on your system: npm ERR! brunch watch --server npm ERR!
You can get their info via: npm ERR! npm owner ls lending-app npm
ERR! There is likely additional logging output above. npm ERR! System
Windows_NT 6.2.9200 npm ERR! command "C:\Program
Files\nodejs\\node.exe" "C:\Program
Files\nodejs\node_modules\npm\bin\npm-cli.js" "start" npm ERR!
cwd C:\Users\damien\Documents\GitHub\lend npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3 npm ERR! code ELIFECYCLE npm ERR! npm ERR!
Additional logging details can be found in: npm ERR!
C:\Users\damien\Documents\GitHub\lend\npm-debug.log npm ERR! not ok
code 0 C:\Users\damien\Documents\GitHub\lend [development]>
npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\\node.exe',
1 verbose cli 'C:\Program
Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm#1.4.3
3 info using node#v0.10.26
4 verbose node symlink C:\Program Files\nodejs\node.exe
5 verbose run-script [ 'prestart', 'start', 'poststart' ]
6 info prestart lending-app#0.0.1
7 info start lending-app#0.0.1
8 verbose unsafe-perm in lifecycle true
9 info lending-app#0.0.1 Failed to exec start script
10 error lending-app#0.0.1 start: brunch watch --server
10 error Exit status 8
11 error Failed at the lending-app#0.0.1 start script.
11 error This is most likely a problem with the lending-app package,
11 error not with npm itself.
11 error Tell the author that this fails on your system:
11 error brunch watch --server
11 error You can get their info via:
11 error npm owner ls lending-app
11 error There is likely additional logging output above.
12 error System Windows_NT 6.2.9200
13 error command "C:\Program Files\nodejs\\node.exe" "C:\Program
Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
14 error cwd C:\Users\damien\Documents\GitHub\lend
15 error node -v v0.10.26
16 error npm -v 1.4.3
17 error code ELIFECYCLE
18 verbose exit [ 1, true ]
npm start calls the scripts.start entry in your package.json file. In this case it looks like the command is brunch watch --server. Chances are you are missing the brunch binary which is causing npm to spit out the error.