I have node.js installed on my machine, I have version: v0.12.0 installed. Following instructions when I use sudo npm install I get these errors:
npm ERR! install Couldn't read dependencies
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.0
npm ERR! npm v2.6.0
npm ERR! path /Users/aston.haigh/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno -2
npm ERR! package.json ENOENT, open '/Users/aston.haigh/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! Please include the following file with any support request:
npm ERR! /Users/aston.haigh/Projects/astonhaigh.co.uk/npm-debug.log
Ive tried clearing the node cache, updating node and havent had any luck, any ideas?
Seem to fix the issue when i uninstalled node and then reinstall using homebrew. P.s really good tutorial: https://www.youtube.com/watch?v=FqMIyTH9wSg
Related
Last night I have upgraded my Node.JS and after that my npm install stopped working. I have uninstall Node and reinstalled it again but that is of no use. I am using Windows 8.1, Node - 8.9.4 and NPM - 3.3.12. Below is the error I am getting while running npm install.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Subrata\\AppData
\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v8.9.4
npm ERR! npm v3.3.12
npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module 'internal/util/types'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! D:\1-NodeJSTest\CoreNodeJSTest\SimpleSessionTest\npm-debug.log
Your NPM is probably out of date. Try typing npm install -g npm to upgrade it, then close your command prompt and open another one, and try to do the npm install again. If that doesn't work, run node --version and npm --version and post the results in a comment here.
I have installed node.js and it has npm installed along with it. In my windows command prompt,when i write "npm install express", it gives me the following error.How to resolve this?
C:\Users>npm -v
2.11.2
C:\Users>npm install express
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\\node.exe" "C:\Program
Files\nodejs \node_modules\npm\bin\npm-cli.js" "install"
"express"
npm ERR! node v0.12.5
npm ERR! npm v2.11.2
npm ERR! error:0906D06C:PEM routines:PEM_read_bio:no start line
npm ERR!
npm ERR! If you need help, you may report this error at: npm ERR!
https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\npm-debug.log
I also got same problem after setting registry problem got resolved.
cmd>> npm set registry registry.npmjs.org
cmd>> npm install
it worked for me.
I have started to learn Angular JS. I am going through this, that is building simple phonecat app
I am following the steps. Node.js downloaded.
Trying to execute this command: npm install
Error occured:
C:>npm install
npm ERR! install Couldn't read dependencies
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (
x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! path C:\package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno -4058
npm ERR! package.json ENOENT, open 'C:\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 directo
ry.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (
x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! Uncaught, unspecified "error" event.
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! C:\npm-debug.log
C:\>
Before executing the command npm install
Execute this cd myproject and then execute this: npm install
Its solved. Thanks.
It looks like you haven't put the package.json file in root directory.
If you are starting fresh, you'll need to clone this repo. https://github.com/angular/angular-phonecat
Like Bilhan A said: you need to change to the folder where you cloned the project to.
From your question I am assuming you are new to programming and want to learn Angularjs primarily. Node.js is not needed for this. If you really want to learn Angular, I recommend Tutorials like this one, which do not require node.js. When you understood how it works, come back to node.js and combine them.
name field in package.json should be the same with name of your project directory.
If this is the error displayed then simply update the npm,i face this issue now that's why i update here,it might be help some one
$ npm install
npm ERR! install Couldn't read dependencies
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe"
"C:\\Program F iles\\nodejs\\node_modules\\npm\\bin\\npm-cli.js"
"install"
npm ERR! node v4.4.5
npm ERR! npm v2.15.5
npm ERR! path C:\Users\joy\package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! package.json ENOENT: no such file or directory, open
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
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\joy\Desktop\TEMP\node\chatsys\npm-debug.log
I'm setting up a Meanjs instance with a Yeoman generator. When I do 'sudo yo meanjs' everything works fine until it looks like it is trying to make a directory and it fails, any ideas on what is going on here?
SOLINK_MODULE(target) Release/kerberos.node: Finished
> bson#0.2.5 install /Users/xxx/Documents/mean/node_modules/connect-
mongo/node_modules/mongodb/node_modules/bson
> (node-gyp rebuild 2> builderror.log) || (exit 0)
CXX(target) Release/obj.target/bson/ext/bson.o
SOLINK_MODULE(target) Release/bson.node
SOLINK_MODULE(target) Release/bson.node: Finished
npm ERR! Error: EACCES, mkdir '/Users/xxx/.npm/uglify-js/2.4.15'
npm ERR! { [Error: EACCES, mkdir '/Users/xxx/.npm/uglify-js/2.4.15']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/Users/xxx/.npm/uglify-js/2.4.15',
npm ERR! parent: 'grunt-contrib-uglify' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 13.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/xxx/Documents/mean
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! path /Users/xxx/.npm/uglify-js/2.4.15
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/Users/xxx/.npm/uglify-js/2.4.15'
npm ERR! not ok code 0
That is a pretty common error.
Yeoman is running the following:
bower install & npm install
Bower install succeeded, however NPM install is failing because of user permissions. Just run:
sudo npm install
The ZenCoder's answer is spot on, but if you want to permanently fix this permissions error, you can follow the tutorial at: https://docs.npmjs.com/getting-started/fixing-npm-permissions
Since you're on a Mac, you could actually avoid npm permissions errors altogether by just installing node instead via homebrew:
brew install node (this will install npm too)
Homebrew installs programs to a directory that doesn't require sudo for write, so you can npm install -g <whatever> freely without it.
I have been trying to use total.js with D3 to create a tree visualization. I am unable to download D3. I do :
npm install D3
I get:
npm ERR! contextify#0.1.8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify#0.1.8 install script.
npm ERR! This is most likely a problem with the contextify 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 contextify
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 12.5.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "d3"
npm ERR! cwd /Users/grantherman/Desktop/vendorTool/node_modules
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/grantherman/Desktop/vendorTool/node_modules/npm-debug.log
npm ERR! not ok code 0
I have tried to download contextify, but I get the same thing. I have successfully downloaded gyp, but it doesn't seem work if I try to download D3.js.
Try to download latest version of node.js (with node.js v0.12.0 everything works).
Update npm and use lowercase d3
Update npm:
npm install -g npm may require sudo
Install d3:
npm install d3
Note: this will install d3 in your current location to install globally use :
sudo npm install d3 -g