Why can't I install any gulp dependencies with npm? [closed] - npm

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 7 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Improve this question
My computer crashed and now no install packages work at all.
This is what is shown in command line:
npm install --save-dev gulp-autoprefixer
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-c
li.js" "install" "--save-dev" "gulp-autoprefixer"
npm ERR! node v0.12.0
npm ERR! npm v2.10.1
npm ERR! file C:\Users\buddy\AppData\Roaming\npm-cache\readable-stream\1.0.33\package\package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! Unexpected token
npm ERR! File: C:\Users\buddy\AppData\Roaming\npm-cache\readable-stream\1.0.33\package\package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\buddy\Desktop\BuildTest\npm-debug.log

npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
That tells you everything you need to know. You need to make sure your package.json is valid JSON.
I would suggest linting it, perhaps through http://jsonlint.com/.

Related

npm probleme to start project [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
when i do npm install i have this error in debian :
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! generator-jhipster#4.14.5 postinstall: opencollective postinstall
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the generator-jhipster#4.14.5 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! /home/esp/.npm/_logs/2020-09-10T17_16_09_060Z-debug.log
You can try this
Delete node modules del node modules
then del package-lock.json
Now jus run again npm i
still not working then run npm cache clean --force
After Completion then you can run npm install and make sure that you are in admin mode.
like Run your project / Terminal as a Admin Mode
In Linux you can use sudo / sudo npm insatll

windows 10 - npm i #truffle/contract [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
Can't install truffle contracts, see Error 1.
ERROR 1:
C:\Vote>npm i #truffle/contract
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git#github.com/web3 js/WebSocket-Node.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
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\laure\AppData\Roaming\npm-cache_logs\2019-11-11T03_41_13_180Z-debug.log
I think Error 2, happens because I haven't installed truffle contract also Error 2 happens on a local web page.
ERROR 2:
Uncaught (in promise) ReferenceError: TruffleContract is not defined
at Object.loadContract (app.js:56)
at async Object.load (app.js:8)
The give away is this line in your error log:
npm ERR! enoent spawn git ENOENT
Basically, it means that the command git was not found and thus can not be executed.
Make sure you have installed git and added it to your environment PATH before running this install command again.

npm install package.js - can I revert to earlier package?

I am following this tutorial on vue.js on YouTube. One of the packages I installed was eslint 5.5 (which is the current version). I saw this error message:
npm ERR! Failed at the server#1.0.0 lint script 'eslint **/*.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! eslint **/*.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs server
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls server
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/jason/Documents/vue-movie/server/npm-debug.log
I tried updating Node and NPM, but that did not change this failure. The tutorial is using "^4.6" and I was wondering if there is a way to revert the package I have to an earlier version? And how would I do that?

Atom editor Package installation error

I got an error when i install packages in Atom
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "C:\\Users\\Jarvis\\AppData\\Local\\atom\\app-1.5.3\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\Jarvis\\AppData\\Local\\atom\\app-1.5.3\\resources\\app\\apm\\node_modules\\npm\\bin\\npm-cli.js" "--globalconfig" "C:\\Users\\Jarvis\\.atom\\.apm\\.apmrc" "--userconfig" "C:\\Users\\Jarvis\\.atom\\.apmrc" "install" "C:\\Users\\Jarvis\\AppData\\Local\\Temp\\d-116128-3752-1lwywgv\\package.tgz" "--target=0.34.5" "--arch=ia32"
npm ERR! node v0.10.40
npm ERR! npm v2.13.3
npm ERR! file C:\Users\Jarvis\.atom\.apm\nopt\3.0.6\package\package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! Unexpected token '\u0000' at 1:1
npm ERR!
npm ERR! ^
npm ERR! File: C:\Users\Jarvis\.atom\.apm\nopt\3.0.6\package\package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse
I am trying to install lots of packages in atom Editor but i got above error.
If you open the C:\Users\Jarvis\.atom\.apm\nopt\3.0.6\package\package.json with Notpad++ ( or any other editor your choice - just don't do it in atom, it will crash, at least in Version 1.6.2 it did for me ) and look for the non printable characters. You will see that the file contain a lot of NUL. I had the same error suddenly one day, when trying to install updates for my packages.
Here is what i did to resolve the error. Be warned however that you have to install all packages again. Personally i use sync-settings (which backups my packages etc.), so it was no big deal for me.
Delete the entire C:\Users\Jarvis.atom\packages folder
Delete the entier C:\Users\Jarvis.atom.apm folder
Reinstall all packages (.apm folders will then installed automatically)
It can be hard to delete those folders because of the Path too long restriction. In this case there helps a Stackexchange answer: How to delete a file in Windows with a too long filename?

packages not installing - "Error: tunneling socket could not be established" [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Debian squeeze (Internet connection running through Tor), nodejs built from the current source - the error has only just started occuring:
root#...# npm install coffee-script
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/coffee-script
npm ERR! Error: tunneling socket could not be established, cause=socket hang up
npm ERR! at ClientRequest.onError (/usr/local/lib/node_modules/npm/node_modules/request/tunnel.js:161:17)
npm ERR! at ClientRequest.g (events.js:193:14)
npm ERR! at ClientRequest.EventEmitter.emit (events.js:93:17)
npm ERR! at CleartextStream.socketErrorListener (http.js:1330:9)
npm ERR! at CleartextStream.EventEmitter.emit (events.js:93:17)
npm ERR! at SecurePair.exports.connect.cleartext._controlReleased (tls.js:1298:15)
npm ERR! at SecurePair.EventEmitter.emit (events.js:93:17)
npm ERR! at SecurePair.error (tls.js:952:10)
npm ERR! at EncryptedStream.CryptoStream._done (tls.js:432:17)
npm ERR! at EncryptedStream.CryptoStream._pull (tls.js:577:12)
npm ERR! If you need help, 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! System Linux 3.2.0-3-486
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "coffee-script"
npm ERR! cwd /home/...
npm ERR! node -v v0.8.11
npm ERR! npm -v 1.1.62
npm ERR! code ECONNRESET
npm ERR!
...
npm ERR! not ok code 0
Iceweasel is also showing an invalid security certificate error for https://registry.npmjs.org/coffee-script.
Anyone any idea what is missing here? (It has occured in the past, fixed itself though for some odd reason.)
Tried setting ca and strict-ssl config options (null and false resp.), didn't work, however setting the registry config option to http://registry.npmjs.org/ and packages are installing again - should this be an ssl domain then?