Comments (16)
☝️ 👍 I watched @sethblanchard run into the same thing. Some weird npm setup issue. This bit from the SO answer post above seemed to fix it:
rm -rf $HOME/.npm
npm cache clean
I'll leave this open for a while just for visibility.
from blendid.
this works for me:
rm node_modules -r
npm install
from blendid.
@fuchao2012 I think you can try
npm cache clean
then rm node_modules & reinstall
It works for me
from blendid.
I found the solution! There is something wrong with the path!
If you run:
npm install -g gulp
you can see the path in one of the first rows depending on how much suff is put out in general. Keep lookig and you will see!
THIS PATH MAY DIFFER TO WHAT
npm root
OUTPUTS! - I checked npm root and thought I was fine but wasn't!
Here is what to do to fix your issue:
http://blog.webbb.be/command-not-found-node-npm/
from blendid.
Hm... Shouldn't have to use sudo
unless installing something globally. In the readme, I'd originally said to do that with gulp, but have JUST updated that bit. Did you try without sudo? I can't replicate.
from blendid.
This fixed it for me: http://stackoverflow.com/questions/23800562/global-npm-install-failing-on-osx
from blendid.
I've since clobbered this VM and it currently does NOT reproduce the issue. (sorry)
But FWIW i ran these commands anyway .. in case this output can be of use.
barry@crunchbang-barry:~/Projects/gitClones/gulp-starter$ npm --version
1.4.28
barry@crunchbang-barry:~/Projects/gitClones/gulp-starter$ sudo npm install
[sudo] password for barry:
npm ERR! install Couldn't read dependencies
npm ERR! package.json ENOENT, open '/home/barry/Projects/gitClones/package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directory.
npm ERR! System Linux 3.2.0-4-486
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/barry/Projects/gitClones
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! path /home/barry/Projects/gitClones/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/barry/Projects/gitClones/npm-debug.log
npm ERR! not ok code 0
barry@crunchbang-barry:~/Projects/gitClones/gulp-starter$ cat npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink /usr/bin/node
5 error install Couldn't read dependencies
6 error package.json ENOENT, open '/home/barry/Projects/gitClones/package.json'
6 error package.json This is most likely not a problem with npm itself.
6 error package.json npm can't find a package.json file in your current directory.
7 error System Linux 3.2.0-4-486
8 error command "/usr/bin/node" "/usr/bin/npm" "install"
9 error cwd /home/barry/Projects/gitClones
10 error node -v v0.10.33
11 error npm -v 1.4.28
12 error path /home/barry/Projects/gitClones/package.json
13 error code ENOPACKAGEJSON
14 error errno 34
15 verbose exit [ 34, true ]
barry@crunchbang-barry:~/Projects/gitClones/gulp-starter$ rm -rf $HOME/.npm
barry@crunchbang-barry:~/Projects/gitClones/gulp-starter$ npm cache clean
barry@crunchbang-barry:~/Projects/gitClones/gulp-starter$ sudo npm install
npm ERR! install Couldn't read dependencies
npm ERR! package.json ENOENT, open '/home/barry/Projects/gitClones/package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directory.
npm ERR! System Linux 3.2.0-4-486
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/barry/Projects/gitClones
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! path /home/barry/Projects/gitClones/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/barry/Projects/gitClones/npm-debug.log
npm ERR! not ok code 0
barry@crunchbang-barry:~/Projects/gitClones/gulp-starter$ cat npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink /usr/bin/node
5 error install Couldn't read dependencies
6 error package.json ENOENT, open '/home/barry/Projects/gitClones/package.json'
6 error package.json This is most likely not a problem with npm itself.
6 error package.json npm can't find a package.json file in your current directory.
7 error System Linux 3.2.0-4-486
8 error command "/usr/bin/node" "/usr/bin/npm" "install"
9 error cwd /home/barry/Projects/gitClones
10 error node -v v0.10.33
11 error npm -v 1.4.28
12 error path /home/barry/Projects/gitClones/package.json
13 error code ENOPACKAGEJSON
14 error errno 34
15 verbose exit [ 34, true ]
barry@crunchbang-barry:~/Projects/gitClones/gulp-starter$
from blendid.
Again had this problem, since this "sudo npm" problem was fixed using
$ npm config get prefix /usr/local/ $ sudo chown -R
whoami /usr/local/
I tried the remedy from @greypants again, but it only started working after i did a rm node_modules -r
.
I'm not sure whats going on, all this might even be unrelated.
Seems the npm install
process got killed halfway through last time, and the files where left in lingo but it didnt detect that. Shouldn't npm log and register problems like that? I see a NPM WARN for the slightest deviation, but aborted installs are not detected yet.
from blendid.
@sirWilliam thanks
from blendid.
got the same issue. can't deal with the proxy in windows. and rm node_modules & reinstall can't work again
from blendid.
Sorry to comment on an old issue, wanted to add more info for posterity. Following the instructions listed by sirwilliam should work. For broken global installs, remove your global node_modules
directory instead. More details here.
from blendid.
rm -r node_modules and then re-install npm helped me.
from blendid.
@movever. Thanks, it worked. :)
from blendid.
I have tried and it wont work with me. I am using Fedora 23 @srmob
from blendid.
It keeps saying
npm install
I tried to
rm -rf $HOME/.npm
rpm cache clean
sudo npm install -g gulp
Anddddd.... nothing!
from blendid.
thanks @movever , god bless u.
from blendid.
Related Issues (20)
- watch task will not compile more than 48 html files HOT 5
- Removing "comments" from public/html files HOT 1
- xlink:href being deprecated in SVG
- Additional Tasks information HOT 4
- Build issue: UglifyJs - Unexpected token: name (context)
- Build issue: UglifyJs - Unexpected token: name (context) HOT 5
- Fonts aren't copied over on build HOT 1
- additionalTasks access rev-manifest HOT 4
- Not bundle jquery in production HOT 1
- Current project status HOT 4
- 4.5.0 release not available through npm/yarn HOT 1
- Failed to mount component: template or render function not defined HOT 1
- upgrade to gulp 4
- empty prebuild and postbuild configs must be `null`/`false`, not `[]`. change this behavior?
- html watch task does not notice changes to files added after Blendid was started
- wrong generation of path for js-files in rev-manifest on windows HOT 1
- Configuration for swiper to work
- The engine "node" is incompatible with this module HOT 3
- 4.5.3 release not available through npm HOT 1
- ERROR in bundle.js from UglifyJs Unexpected token: name (ChangeDesc) [bundle.js:2900,6]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blendid.