trumank / scratch-api

An API to interact with the Scratch website
MIT License
94 stars 32 forks source link

Can't install on raspberry pi. #3

Closed Icelys closed 8 years ago

Icelys commented 8 years ago

When I go to install, It says I can't install the package prompt. Is there any way around this?

trumank commented 8 years ago

Can you post your npm-debug.log file? It should be in your home directory.

Icelys commented 8 years ago

0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'install' ] 2 info using npm@1.2.14 3 info using node@v0.10.0 4 verbose read json /home/pi/package.json 5 error install Couldn't read dependencies 6 error Error: ENOENT, open '/home/pi/package.json' 7 error If you need help, you may report this log at: 7 error http://github.com/isaacs/npm/issues 7 error or email it to: 7 error npm-@googlegroups.com 8 error System Linux 3.12.22+ 9 error command "/usr/local/bin/node" "/usr/local/bin/npm" "install" 10 error cwd /home/pi 11 error node -v v0.10.0 12 error npm -v 1.2.14 13 error path /home/pi/package.json 14 error code ENOENT 15 error errno 34 16 verbose exit [ 34, true ]

Icelys commented 8 years ago

Additionally, here is what comes up when running npm install scratch-api:

cd node_modules
pi@Pi ~/node_modules $ ls
pi@Pi ~/node_modules $ cd ..
pi@Pi ~ $ npm install scratch-api
npm http GET https://registry.npmjs.org/scratch-api
npm http 304 https://registry.npmjs.org/scratch-api
npm http GET https://registry.npmjs.org/prompt
npm http 304 https://registry.npmjs.org/prompt
npm ERR! Error: No compatible version found: prompt@'^0.2.14'
npm ERR! Valid install targets:
npm ERR! ["0.0.1","0.0.2","0.0.3","0.0.4","0.1.0","0.1.1","0.1.2","0.1.3","0.1.4","0.1.5","0.1.7","0.1.8","0.1.9","0.1.10","0.1.11","0.1.12","0.2.0","0.2.1","0.2.2","0.2.3","0.2.4","0.2.5","0.2.6","0.2.7","0.2.8","0.2.9","0.2.10","0.2.11","0.2.12","0.2.13","0.2.14"]
npm ERR!     at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:682:10)
npm ERR!     at /usr/local/lib/node_modules/npm/lib/cache.js:597:10
npm ERR!     at saved (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:138:7)
npm ERR!     at Object.oncomplete (fs.js:93:15)
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.12.22+
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "scratch-api"
npm ERR! cwd /home/pi
npm ERR! node -v v0.10.0
npm ERR! npm -v 1.2.14
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/npm-debug.log
npm ERR! not ok code 0
trumank commented 8 years ago

This is not a problem with scratch-api. The npm version you have installed is way out of date (v1.2.14) and it should work if you update it (v3.5.3 is the latest.)

jeandrek commented 8 years ago

run npm install npm to update it as the repos of whatever distro you are using are probably out of date

Icelys commented 8 years ago

When I do that, this happens:

npm install npm
npm http GET https://registry.npmjs.org/npm
npm http 304 https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/npm/-/npm-3.5.3.tgz
npm http 200 https://registry.npmjs.org/npm/-/npm-3.5.3.tgz
npm ERR! cb() never called!
npm ERR! not ok code 0
trumank commented 8 years ago

http://stackoverflow.com/questions/15393821/npm-err-cb-never-called

jeandrek commented 8 years ago

sorry I mean npm install -g npm. You'll need to be root (run with sudo)

Icelys commented 8 years ago

Ah. Thank you! Problem fixed.