2

I'm trying to create SharePoint Framework hello world project as mentioned in tutorial. But it fails in the end with error npm ERR! @microsoft/[email protected] install: node npm-install-script.js.

Below is detailed error shown as in Cmdler.

> @microsoft/[email protected] install d:\dev\Repos\spx-helloworld-webpart\node_modules\@microsoft\sp-webpart-workbench\node_modules\@microsoft\sp-loader
> node npm-install-script.js

d:\dev\Repos\spx-helloworld-webpart\node_modules\@microsoft\sp-webpart-workbench\node_modules\@microsoft\sp-loader\npm-install-script.js:3
const path = require('path');
^^^^^
SyntaxError: Use of const in strict mode.
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3
|


> [email protected] postinstall d:\dev\Repos\spx-helloworld-webpart\node_modules\@microsoft\sp-build-web\node_modules\@microsoft\gulp-core-build-sass\node_modules\gulp-sass\node_modules\node-sass
> node scripts/build.js

Binary found at d:\dev\Repos\spx-helloworld-webpart\node_modules\@microsoft\sp-build-web\node_modules\@microsoft\gulp-core-build-sass\node_modules\gulp-sass\node_modules\node-sass\vendor\win32-ia32-14\binding.node
Testing binary
Binary is fine
npm WARN engine [email protected]: wanted: {"node":">= 5.3","npm":">= 3.5"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--cache-min" "86400"
npm ERR! node v0.12.2
npm ERR! npm  v2.7.4
npm ERR! code ELIFECYCLE

npm ERR! @microsoft/[email protected] install: `node npm-install-script.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @microsoft/[email protected] install script 'node npm-install-script.js'.
npm ERR! This is most likely a problem with the @microsoft/sp-loader package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node npm-install-script.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls @microsoft/sp-loader
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     d:\dev\Repos\spx-helloworld-webpart\npm-debug.log

Below is the section in npm-debug.log file.

14409 info @microsoft/[email protected] Failed to exec install script
14410 verbose unlock done using C:\Users\Sachira\AppData\Roaming\npm-cache\_locks\microsoft-sp-loader-f6f9f5c41a8a0aaa.lock for d:\dev\Repos\spx-helloworld-webpart\node_modules\@microsoft\sp-loader
14411 verbose stack Error: @microsoft/[email protected] install: `node npm-install-script.js`
14411 verbose stack Exit status 1
14411 verbose stack     at EventEmitter. (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16)
14411 verbose stack     at EventEmitter.emit (events.js:110:17)
14411 verbose stack     at ChildProcess. (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\spawn.js:14:12)
14411 verbose stack     at ChildProcess.emit (events.js:110:17)
14411 verbose stack     at maybeClose (child_process.js:1015:16)
14411 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
14412 verbose pkgid @microsoft/[email protected]
14413 verbose cwd d:\dev\Repos\spx-helloworld-webpart
14414 error Windows_NT 6.3.9600
14415 error argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "@microsoft/sp-loader"
14416 error node v0.12.2
14417 error npm  v2.7.4
14418 error code ELIFECYCLE
14419 error @microsoft/[email protected] install: `node npm-install-script.js`
14419 error Exit status 1
14420 error Failed at the @microsoft/[email protected] install script 'node npm-install-script.js'.
14420 error This is most likely a problem with the @microsoft/sp-loader package,
14420 error not with npm itself.
14420 error Tell the author that this fails on your system:
14420 error     node npm-install-script.js
14420 error You can get their info via:
14420 error     npm owner ls @microsoft/sp-loader
14420 error There is likely additional logging output above.
14421 verbose exit [ 1, true ]
14422 verbose unbuild node_modules\@microsoft\sp-loader
14423 info preuninstall @microsoft/[email protected]
14424 info uninstall @microsoft/[email protected]
14425 verbose unbuild rmStuff @microsoft/[email protected] from d:\dev\Repos\spx-helloworld-webpart\node_modules
14426 verbose unbuild rmStuff in d:\dev\Repos\spx-helloworld-webpart\node_modules\@microsoft
14427 info postuninstall @microsoft/[email protected]

1 Answer 1

3

It would appear that you have an ancient version of node (0.12.2). You should be on the LTS version, or at least 4.6.1 Your version of npm is also quite old.

1
  • Thank you. That was the issue. I thought I had node installed properly. Guess I was not. Commented Mar 2, 2017 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.