Thursday, 16 March 2017

npm Error: spawn EACCES when building on specific machine

When running npm run dev using the same source code and configuration on two machines one machine gives the following error:

> node build/dev-server.js

internal/child_process.js:302
    throw errnoException(err, 'spawn');
    ^

Error: spawn EACCES
    at exports._errnoException (util.js:896:11)
    at ChildProcess.spawn (internal/child_process.js:302:11)
    at Object.exports.spawn (child_process.js:367:9)
    at module.exports (/path-to/node_modules/opn/index.js:75:24)
    at Server.<anonymous> (/path-to/build/dev-server.js:81:5)
    at Server.g (events.js:286:16)
    at emitNone (events.js:86:13)
    at Server.emit (events.js:185:7)
    at emitListeningNT (net.js:1272:10)
    at _combinedTickCallback (internal/process/next_tick.js:71:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    at Function.Module.runMain (module.js:577:11)
    at startup (node.js:159:18)
    at node.js:444:3

I have permission to run npm and node, I am using node v6.0.0, npm v3.8.6.

I also get a similar error when trying to run unit tests (npm run unit)

Error: spawn karma ENOENT

the build script runs OK though. Here is relevant section from my package.json:

"scripts": {
    "dev": "node build/dev-server.js",
    "build": "node build/build.js",
    "unit": "cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run",

Any ideas?



via Don Smythe

No comments:

Post a Comment