Can't install Grunt package in WebStorm 8:
Install packages failed: Error occurred when installing package grunt.
Log:
Install packages failed: Error occurred when installing package grunt.
"C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" install grunt
Exit code: 1
Standard error:
npm ERR! Error: Invalid version: "0.1"
npm ERR! at Object.module.exports.fixVersionField (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\node_modules\normalize-package-data\lib\fixer.js:183:13)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\node_modules\normalize-package-data\lib\normalize.js:30:38
npm ERR! at Array.forEach (native)
npm ERR! at normalize (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\node_modules\normalize-package-data\lib\normalize.js:29:15)
npm ERR! at final (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:342:33)
npm ERR! at then (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:126:33)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:328:57
npm ERR! at fs.js:207:20
npm ERR! at OpenReq.Req.done (C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:144:5)
npm ERR! at OpenReq.done (C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:64:22)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "grunt"
npm ERR! cwd C:\Users\ID25\Desktop\untitled1
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm`
please, help me!!!
Please check your package.json - what is the "version" value? '0.1' is not a valid value, as it doesn't conform to the versioning scheme (http://semver.org/) npm packages uses. see https://www.npmjs.org/doc/json.html
Related
I have cloned my project from git and when trying to do the npm install, it's not working.
I can't fix any of the errors - for example when trying to fix the core-js error with npm install --save core-js#^3 I still get the same message, that I need to upgrade.
Why is this happening? there were no errors before I cloned this repo?
npm WARN deprecated #babel/polyfill#7.12.1: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the #babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.
npm WARN deprecated core-js#2.6.12: 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 ERR! code 1
npm ERR! path C:\Users\User\Desktop\mydailyprep\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#3.8.0
npm ERR! gyp info using node#14.16.1 | win32 | x64
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: C:\Python\Python39\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack File "<string>", line 1
npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack ^
npm ERR! gyp ERR! stack SyntaxError: invalid syntax
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack at ChildProcess.exithandler (child_process.js:308:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:315:20)
npm ERR! gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
npm ERR! gyp ERR! System Windows_NT 10.0.17134
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\User\\Desktop\\myapp\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\User\Desktop\mydailyprep\node_modules\node-sass
npm ERR! gyp ERR! node -v v14.16.1
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Local\npm-cache\_logs\2021-04-09T10_33_10_047Z-debug.log
Try :
npm cache clean --force
npm install
Even I faced same kind of issue... might be this may be helpful to you.. :)
I have created a folder called "projects (Folder Name)" in that I have taken the clone of my project - called "xyz project (projects >> xyz project)"..
now by mistake I tried to install - npm install in "projects folder (parent folder)"..
but node modules have to be installed in "xyz project" (child folder)
So when I have used npm i... in xyz project... then node modules have installed SUCCESSFULLY..
Try this..
npm i quick.db
better-sqlite3#7.1.2 install C:\Users\Łukasz\Desktop\Clays v2.0\node_modules\better-sqlite3
prebuild-install || npm run build-release
prebuild-install WARN install No prebuilt binaries found (target=14.15.1 runtime=node arch=x64 libc= platform=win32)
better-sqlite3#7.1.2 build-release
node-gyp rebuild --release
gyp ERR! configure error
gyp ERR! stack Error: spawn C:\Users\�ukasz.windows-build-tools\python27\python.exe ENOENT
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
gyp ERR! stack at onErrorNT (internal/child_process.js:465:16)
gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:80:21)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Łukasz\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--release"
gyp ERR! cwd C:\Users\Łukasz\Desktop\Clays v2.0\node_modules\better-sqlite3
gyp ERR! node -v v14.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code 1
npm ERR! path C:\Users\Łukasz\Desktop\Clays v2.0\node_modules\better-sqlite3
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild --release
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Łukasz\AppData\Roaming\npm-cache_logs\2021-03-23T08_21_59_641Z-debug.log
npm WARN Invalid version: "0.1"
npm WARN Clays v2.0 No description
npm WARN Clays v2.0 No repository field.
npm WARN Clays v2.0 No README data
npm WARN Clays v2.0 No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! better-sqlite3#7.1.2 install: prebuild-install || npm run build-release
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the better-sqlite3#7.1.2 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\Łukasz\AppData\Roaming\npm-cache_logs\2021-03-23T08_21_59_893Z-debug.log
Above I gave an error while installing quick.db. Does anyone have a way to solve it?
I was trying to install client-session using npm and I am getting this error
also I tried installing node_gyp using npm.
Also I tried to clone it using git but i am getting this node gyp error. Also I cannot find proper documents of the cause of this error.
if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-
gyp.js" rebuild ) else (node rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:116:14)
gyp ERR! stack at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:71:11
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\fuckyou\node_modules\client-session
gyp ERR! node -v v4.2.4
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "client-session"
npm ERR! node v4.2.4
npm ERR! npm v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! client-session#0.1.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client-session#0.1.7 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the client-session 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 client-session
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\fuckyou\npm-debug.log
You need to install Python on your machine or fix the current installation.
Please refer to this answer on how to do that.
This may sound like a duplicate question, but, believe me, it's not. I couldn't find any source detailing the same error and how to remedy it:
C:\Users\admin\Desktop\nodejsfiles>npm install formidable
npm http GET https://registry.npmjs.org/formidable
npm ERR! Error: failed to fetch from registry: formidable
npm ERR! at C:\Program Files\nodejs\node_modules\npm\lib\utils\npm-registry-
client\get.js:139:12
npm ERR! at cb (C:\Program Files\nodejs\node_modules\npm\lib\utils\npm-regis
try-client\request.js:32:9)
npm ERR! at Request._callback (C:\Program Files\nodejs\node_modules\npm\lib\
utils\npm-registry-client\request.js:137:18)
npm ERR! at Request.callback (C:\Program Files\nodejs\node_modules\npm\node_
modules\request\main.js:109:22)
npm ERR! at Request.<anonymous> (C:\Program Files\nodejs\node_modules\npm\no
de_modules\request\main.js:198:58)
npm ERR! at Request.emit (events.js:88:20)
npm ERR! at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\
npm\node_modules\request\main.js:356:14)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1258:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR!
npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "formidable"
npm ERR! cwd C:\Users\admin\Desktop\nodejsfiles
npm ERR! node -v v0.6.10
npm ERR! npm -v 1.1.0-3
npm ERR! message failed to fetch from registry: formidable
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\admin\Desktop\nodejsfiles\npm-debug.log
npm not ok
Seems like this works
npm config set registry http://registry.npmjs.org/
Quoted from "message failed to fetch from registry" while trying to install any module
Anyway I recommend updating to latest versions of nodejs and npm.
I am trying to do npm install on a project that requires 'ref' and I get this error. Any idea how can I correct this?
I have nvm runnning and node -v = 0.10.26
ref#0.1.3 install /root/node-ffi-libvirt/nodejs-usage/ffi-libvirt/node_modules/ref
node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: EACCES, mkdir '/root/node-ffi-libvirt/nodejs-usage/ffi-libvirt/node_modules/ref/build'
gyp ERR! System Linux 3.11.0-12-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /root/node-ffi-libvirt/nodejs-usage/ffi-libvirt/node_modules/ref
gyp ERR! node -v v0.10.15
gyp ERR! node-gyp -v v0.10.9
gyp ERR! not ok
npm ERR! ref#0.1.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ref#0.1.3 install script.
npm ERR! This is most likely a problem with the ref 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 ref
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.11.0-12-generic
npm ERR! command "node" "/root/.nvm/v0.10.26/bin/npm" "install" "ref"
npm ERR! cwd /root/node-ffi-libvirt/nodejs-usage/ffi-libvirt
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.4
This suggests you don't have permission to create a directory.
It looks like the original project was installed as root (implied by the /root in the path) - so you must run the install as root as well.
try mkdir '/root/node-ffi-libvirt/nodejs-usage/ffi-libvirt/node_modules/ref/build' with the user you are running the command from. Fix that first and then run your command.