Не удается установить Protractor 2.0.0: ENOENT в bufferutil при перестройке node-gyp

Пытаясь установить Protractor 2.0.0, я столкнулся со следующей проблемой:

$ npm install -g protractor
npm http GET https://registry.npmjs.org/protractor
npm http 304 https://registry.npmjs.org/protractor
...
npm http 200 https://registry.npmjs.org/nan

> [email protected] install C:\Users\clouderial\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate
> node-gyp rebuild


C:\Users\clouderial\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate {git}
{lamb} node "d:\Developpement\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack     at errnoException (child_process.js:998:11)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:34)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "d:\\Developpement\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\clouderial\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]

> [email protected] install C:\Users\clouderial\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\node_modules\ws\node_modules\bufferutil
> node-gyp rebuild


C:\Users\clouderial\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\node_modules\ws\node_modules\bufferutil {git}
{lamb} node "d:\Developpement\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack     at errnoException (child_process.js:998:11)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:34)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "d:\\Developpement\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\clouderial\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\node_modules\ws\node_modules\bufferutil
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]
C:\Users\clouderial\AppData\Roaming\npm\protractor -> C:\Users\clouderial\AppData\Roaming\npm\node_modules\protractor\bin\protractor
C:\Users\clouderial\AppData\Roaming\npm\webdriver-manager -> C:\Users\clouderial\AppData\Roaming\npm\node_modules\protractor\bin\webdriver-manager
npm WARN unmet dependency C:\Users\clouderial\AppData\Roaming\npm\node_modules\jmcnet\node_modules\grunt-contrib-watch requires lodash@'~2.4.1' but will load
npm WARN unmet dependency C:\Users\clouderial\AppData\Roaming\npm\node_modules\jmcnet\node_modules\lodash,
npm WARN unmet dependency which is version 3.5.0
[email protected] C:\Users\clouderial\AppData\Roaming\npm\node_modules\protractor
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected])

Я работаю под Windows8, и мне пришлось установить Python (3.4.3), чтобы выполнить эту установку.

Мои тесты E2E не работают после этой установки. Любая помощь будет принята с благодарностью.

Жан-Марк


person jmcollin92    schedule 22.03.2015    source источник
comment
Я пытаюсь использовать Python 2.7 и все равно получаю сообщение об ошибке, но другое: MSBUILD: ошибка MSB3428: Невозможно загрузить компонент Visual C++ VCBuild.exe. Чтобы исправить проблему, выполните следующие действия: 1) установщик комплекта для разработки .NET Framework 2.0 SDK, 2) установщик Microsoft Visual Studio 2005 или 3) добавьте компонент в систему доступа к системе, если он не установлен . [C:\Users\clouderial\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\node_modules\ws\node_modules\bufferutil\build\binding .sln]   -  person jmcollin92    schedule 22.03.2015


Ответы (1)


Было 2 проблемы: 1. Python 2.7.x должен быть установлен вместо Python 3.x, 2. Перед запуском npm необходимо установить переменную среды с именем PYTHON, значение которой равно path+python.exe.

После этого изменения установка может быть продолжена (но заблокирована здесь: Установка Protractor 2.0 и ошибка MSBUILD MSB3428)

Жан-Марк.

person jmcollin92    schedule 23.03.2015