Я пытаюсь установить библиотеку джонни пять для Node.js на окна 7, но получаю сообщение об ошибке:Node.js - установка ДЖОННИ пять библиотеки на окнах
Your environment has been set up for using Node.js 0.10.15 (x64) and npm.
C:\Users\User>npm install johnny-five
npm http GET https://registry.npmjs.org/johnny-five
npm http 304 https://registry.npmjs.org/johnny-five
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/firmata
npm http GET https://registry.npmjs.org/es6-collections
npm http GET https://registry.npmjs.org/descriptor
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/compulsive
npm http GET https://registry.npmjs.org/serialport
npm http GET https://registry.npmjs.org/temporal
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/keypress
npm http GET https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/colors
npm http 304 https://registry.npmjs.org/firmata
npm http 304 https://registry.npmjs.org/es6-collections
npm http 304 https://registry.npmjs.org/descriptor
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/compulsive
npm http 304 https://registry.npmjs.org/serialport
npm http 304 https://registry.npmjs.org/temporal
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/socket.io
npm http 304 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/keypress
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/socket.io-client/0.9.16
npm http GET https://registry.npmjs.org/base64id/0.1.0
npm http GET https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/redis/0.7.3
npm http GET https://registry.npmjs.org/bindings/1.1.0
npm http GET https://registry.npmjs.org/async/0.1.18
npm http GET https://registry.npmjs.org/sf/0.1.6
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/policyfile/0.0.4
npm http 304 https://registry.npmjs.org/base64id/0.1.0
npm http 304 https://registry.npmjs.org/redis/0.7.3
npm http 304 https://registry.npmjs.org/socket.io-client/0.9.16
npm http GET https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.
16.tgz
npm http 304 https://registry.npmjs.org/bindings/1.1.0
npm http 304 https://registry.npmjs.org/async/0.1.18
npm http 304 https://registry.npmjs.org/sf/0.1.6
> [email protected] install C:\Users\User\node_modules\johnny-five\node_modules
\serialport
> node-gyp rebuild
C:\Users\User\node_modules\johnny-five\node_modules\serialport>node "C:\Progra
m Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bi
n\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: Command failed: ImportError: No module named site
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:637:15)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at maybeClose (child_process.js:735:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:802:
5)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\User\node_modules\johnny-five\node_modules\serialport
gyp ERR! node -v v0.10.15
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok
npm ERR! weird error 1
npm http 200 https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.
16.tgz
npm ERR! not ok code 0
У меня была такая же проблема на макинтош , но решил это, установив компоненты командной строки xcode, как было предложено в предыдущем посте, но не знаю, как это решить для Windows.
Спасибо за помощь!
Для потомков: Я получил сообщения об ошибках в OP (в числе других последующих ошибок) при попытке установить 'topojson' (' npm install -g topojson --msvs_version = 2013'). Я установил Visual Studio Express 2013 и Windows SDK, а также 'npm install -g gyp', но продолжаю получать ошибки, которые начинаются с' gyp ERR! configure error' и 'gyp ERR! stack Ошибка: команда не выполнена: ImportError: нет модуля с именем site'. – jbaums
Оказывается, что 'No module named site ', вероятно, указывает на проблему с путём Python. У меня были переменные системной среды «PYTHONPATH», «PYTHONHOME» и «Path» [установлены соответственно] (http://stackoverflow.com/a/5687052/489704), но, возможно, я должен был использовать 'npm config set python/path/to/executable/python2.7', как описано [здесь] (https://github.com/TooTallNate/node-gyp). Вместо этого я удалил «PYTHONPATH» и «PYTHONHOME» и удалил Python из «Пути», а затем переустановил Python 2.7.6 (моя существующая установка была любезно предоставлена ArcGIS), и эта ошибка теперь обойдена, а другие появились. – jbaums
Мои новые ошибки начинаются с 'gyp ERR! build error' и 'gyp ERR! stack Ошибка: 'C: \ Program Files (x86) \ MSBuild \ 12.0 \ bin \ msbuild.exe' не удалось с кодом выхода: 1'. Я удалил MS Visual Studio Express 2013 и установил MSVS Express 2012, а 'topojson' теперь установлен отлично. – jbaums