Installing npm on vagrant -
i tried install , use npm in 2 ways, errors.
installing npm normal way:
vagrant@precise64:~$ npm install npm err! couldn't read dependencies. npm err! error: enoent, no such file or directory '/home/vagrant/package.json' npm err! may report log at: npm err! <http://bugs.debian.org/npm> npm err! or use npm err! reportbug --attach /home/vagrant/npm-debug.log npm npm err! npm err! system linux 3.2.0-23-generic npm err! command "node" "/usr/bin/npm" "install" npm err! cwd /home/vagrant npm err! node -v v0.6.12 npm err! npm -v 1.1.4 npm err! path /home/vagrant/package.json npm err! code enoent npm err! message enoent, no such file or directory '/home/vagrant/package.json' npm err! errno {} npm err! npm err! additional logging details can found in: npm err! /home/vagrant/npm-debug.log npm not ok trying install latest version:
vagrant@precise64:~$ npm install -g npm@latest npm http https://registry.npmjs.org/npm npm err! error: failed fetch registry: npm npm err! @ /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12 npm err! @ cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9) npm err! @ request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18) npm err! @ request.callback (/usr/lib/nodejs/request/main.js:119:22) npm err! @ request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58) npm err! @ request.emit (events.js:88:20) npm err! @ clientrequest.<anonymous> (/usr/lib/nodejs/request/main.js:412:12) npm err! @ clientrequest.emit (events.js:67:17) npm err! @ httpparser.onincoming (http.js:1261:11) npm err! @ httpparser.onheaderscomplete (http.js:102:31) npm err! may report log at: npm err! <http://bugs.debian.org/npm> npm err! or use npm err! reportbug --attach /home/vagrant/npm-debug.log npm npm err! npm err! system linux 3.2.0-23-generic npm err! command "node" "/usr/bin/npm" "install" "-g" "npm@latest" npm err! cwd /home/vagrant npm err! node -v v0.6.12 npm err! npm -v 1.1.4 npm err! message failed fetch registry: npm npm err! npm err! additional logging details can found in: npm err! /home/vagrant/npm-debug.log npm not ok what should install before create package.json file ane make work?
npm looks it's installed. go project root and:
npm init it'll walk through making package.json file, can
npm whateverpackageyouwant to heart's content.
Comments
Post a Comment