# Erro com nodejs e npm

**URL:** <https://forum.casadocodigo.com.br/t/erro-com-nodejs-e-npm/188>\
**Category:** Livros\
**Tags:** node.js\
**Created:** [Maio 11, 2016, 9:46pm UTC](https://forum.casadocodigo.com.br/t/erro-com-nodejs-e-npm/188 "2016-05-11T21:46:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SartMorgs](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@SartMorgs](https://forum.casadocodigo.com.br/u/SartMorgs)\
**Post date:** [Maio 11, 2016, 9:46pm UTC](https://forum.casadocodigo.com.br/t/erro-com-nodejs-e-npm/188/1 "2016-05-11T21:46:58Z")

</div>

Estava instalando o Phonegap no meu notebook, que possui windows 10, e quando fui pra parte em que precisava rodar o comando “npm install -g phonegap” no prompt, os seguintes erros apareceram:

Microsoft Windows [versão 10.0.10586]  
(c) 2015 Microsoft Corporation. Todos os direitos reservados.

C:\Windows\system32\>npm install -g phonegap  
npm WARN deprecated lodash@1.0.2: lodash@\<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.  
npm WARN deprecated graceful-fs@3.0.8: graceful-fs v3.0.0 and before will fail on node releases \>= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use ‘npm ls graceful-fs’ to find it in the tree.  
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases \>= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use ‘npm ls graceful-fs’ to find it in the tree.

> bufferutil@1.2.1 install C:\Users\Morgana Sartor\AppData\Roaming\npm\node\_modules\phonegap\node\_modules\connect-phonegap\node\_modules\socket.io\node\_modules\socket.io-client\node\_modules\engine.io-client\node\_modules\ws\node\_modules\bufferutil  
> node-gyp rebuild

C:\Users\Morgana Sartor\AppData\Roaming\npm\node\_modules\phonegap\node\_modules\connect-phonegap\node\_modules\socket.io\node\_modules\socket.io-client\node\_modules\engine.io-client\node\_modules\ws\node\_modules\bufferutil\>if not defined npm\_config\_node\_gyp (node “C:\Program Files\nodejs\node\_modules\npm\bin\node-gyp-bin\…..\node\_modules\node-gyp\bin\node-gyp.js” rebuild ) else (node “” rebuild )  
Building the projects in this solution one at a time. To enable parallel build, please add the “/m” switch.  
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(5040,39  
): error MSB4023: Cannot evaluate the item metadata “%(FullPath)”. The item metadata “%  
(FullPath)” cannot be applied to the path “Release\obj\bufferutil\bufferutil.node”. C:  
Users\Morgana Sartor\AppData\Roaming\npm\node\_modules\phonegap\node\_modules\connect-pho  
negap\node\_modules\socket.io\node\_modules\socket.io-client\node\_modules\engine.io-clien  
t\node\_modules\ws\node\_modules\bufferutil\build\Release\obj\bufferutil\bufferutil.node  
|[C:\Users\Morgana Sartor\AppData\Roaming\npm\node\_modules\phonegap\node\_modules\connect  
lient\node\_modules\ws\node\_modules\bufferutil\build\bufferutil.vcxproj]ules\engine.io-c  
gyp ERR! build error  
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1  
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node\_modules\npm\node\_modules\node-gyp\lib\build.js:276:23)  
gyp ERR! stack at emitTwo (events.js:87:13)  
gyp ERR! stack at ChildProcess.emit (events.js:172:7)  
gyp ERR! stack at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:200:12)  
gyp ERR! System Windows\_NT 10.0.10586  
gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node\_modules\npm\node\_modules\node-gyp\bin\node-gyp.js” “rebuild”  
gyp ERR! cwd C:\Users\Morgana Sartor\AppData\Roaming\npm\node\_modules\phonegap\node\_modules\connect-phonegap\node\_modules\socket.io\node\_modules\socket.io-client\node\_modules\engine.io-client\node\_modules\ws\node\_modules\bufferutil  
gyp ERR! node -v v4.4.4  
gyp ERR! node-gyp -v v3.3.1  
gyp ERR! not ok

> utf-8-validate@1.2.1 install C:\Users\Morgana Sartor\AppData\Roaming\npm\node\_modules\phonegap\node\_modules\connect-phonegap\node\_modules\socket.io\node\_modules\socket.io-client\node\_modules\engine.io-client\node\_modules\ws\node\_modules\utf-8-validate  
> node-gyp rebuild

- 

C:\Users\Morgana Sartor\AppData\Roaming\npm\node\_modules\phonegap\node\_modules\connect-phonegap\node\_modules\socket.io\node\_modules\socket.io-client\node\_modules\engine.io-client\node\_modules\ws\node\_modules\utf-8-validate\>if not defined npm\_config\_node\_gyp (node “C:\Program Files\nodejs\node\_modules\npm\bin\node-gyp-bin\…..\node\_modules\node-gyp\bin\node-gyp.js” rebuild ) else (node “” rebuild )  
Building the projects in this solution one at a time. To enable parallel build, please add the “/m” switch.  
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(5040,39  
): error MSB4023: Cannot evaluate the item metadata “%(FullPath)”. The item metadata “%  
(FullPath)” cannot be applied to the path “Release\obj\validation\validation.node”. C:  
Users\Morgana Sartor\AppData\Roaming\npm\node\_modules\phonegap\node\_modules\connect-pho  
negap\node\_modules\socket.io\node\_modules\socket.io-client\node\_modules\engine.io-clien  
t\node\_modules\ws\node\_modules\utf-8-validate\build\Release\obj\validation\validation.n  
ode [C:\Users\Morgana Sartor\AppData\Roaming\npm\node\_modules\phonegap\node\_modules\con  
nect-phonegap\node\_modules\socket.io\node\_modules\socket.io-client\node\_modules\engine.  
io-client\node\_modules\ws\node\_modules\utf-8-validate\build\validation.vcxproj]  
gyp ERR! build error  
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1  
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node\_modules\npm\node\_modules\node-gyp\lib\build.js:276:23)  
gyp ERR! stack at emitTwo (events.js:87:13)  
gyp ERR! stack at ChildProcess.emit (events.js:172:7)  
gyp ERR! stack at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:200:12)  
gyp ERR! System Windows\_NT 10.0.10586  
gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node\_modules\npm\node\_modules\node-gyp\bin\node-gyp.js” “rebuild”  
gyp ERR! cwd C:\Users\Morgana Sartor\AppData\Roaming\npm\node\_modules\phonegap\node\_modules\connect-phonegap\node\_modules\socket.io\node\_modules\socket.io-client\node\_modules\engine.io-client\node\_modules\ws\node\_modules\utf-8-validate  
gyp ERR! node -v v4.4.4  
gyp ERR! node-gyp -v v3.3.1  
gyp ERR! not ok  
npm WARN optional dep failed, continuing bufferutil@1.2.1  
npm WARN optional dep failed, continuing utf-8-validate@1.2.1  
C:\Users\Morgana Sartor\AppData\Roaming\npm\phonegap → C:\Users\Morgana Sartor\AppData\Roaming\npm\node\_modules\phonegap\bin\phonegap.js  
phonegap@6.2.2 C:\Users\Morgana Sartor\AppData\Roaming\npm\node\_modules\phonegap  
├── pluralize@0.0.4  
├── opener@1.4.1  
├── colors@0.6.0-1  
├── semver@1.1.0  
├── minimist@0.1.0  
├── qrcode-terminal@0.9.4  
├── shelljs@0.1.4  
├── update-notifier@0.6.3 (is-npm@1.0.0, semver-diff@2.1.0, chalk@1.1.3, boxen@0.3.1, configstore@2.0.0, latest-version@2.0.0)  
├── prompt@0.2.11 (revalidator@0.1.8, pkginfo@0.4.0, read@1.0.7, winston@0.6.2, utile@0.2.1)  
├── phonegap-build@0.10.0 (colors@0.6.2, qrcode-terminal@0.8.0, optimist@0.3.7, shelljs@0.0.9, phonegap-build-api@0.4.0)  
├── connect-phonegap@0.21.2 (home-dir@0.1.2, connect-inject@0.3.2, ip@0.3.1, adm-zip@0.4.7, request-progress@0.3.1, http-proxy@1.8.1, walkdir@0.0.8, shelljs@0.2.6, useragent@2.0.8, request@2.33.0, node-static@0.7.0, gaze@0.4.3, tar@0.1.19, localtunnel@1.3.0, [socket.io](http://socket.io)@1.4.0, connect@2.12.0, archiver@0.14.3)  
└── cordova@6.1.1 (underscore@1.7.0, q@1.0.1, ansi@0.3.1, nopt@3.0.1, update-notifier@0.5.0, cordova-common@1.2.0, cordova-lib@6.1.1)

C:\Windows\system32\>apt-get install build-essential python2.7,

Alguém pode me ajudar?
