Compile static files error

[root@localhost static]# node -v
v6.9.1
[root@localhost static]# npm -v
3.10.8
[root@localhost static]# NODE_ENV="production" && npm run build

> @ build /opt/htdocs/project/static
> atool-build

sh: atool-build: command not found

npm ERR! Linux 2.6.32-642.11.1.el6.x86_64
npm ERR! argv "/usr/local/node/bin/node" "/usr/local/node/bin/npm" "run" "build"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @ build: `atool-build`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the @ build script 'atool-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     atool-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs 
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls 
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
1 Like

Did you npm install?

1 Like
[root@localhost static]# npm install
npm WARN prefer global node-gyp@3.4.0 should be installed with -g

> node-sass@3.13.1 install /opt/htdocs/project/static/node_modules/node-sass
> node scripts/install.js

/opt/htdocs/project/static/node_modules/tough-cookie/lib/cookie.js:80
  'Jan
  ^^^^
SyntaxError: Invalid or unexpected token
    at Object.exports.runInThisContext (vm.js:76:16)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/opt/htdocs/project/static/node_modules/request/lib/cookies.js:3:13)
    at Module._compile (module.js:570:32)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN extract-text-webpack-plugin@2.0.0-beta.4 requires a peer of webpack@^2.1.0-beta.19 but none was installed.
npm WARN webpack-dev-middleware@1.6.1 requires a peer of webpack@1 || ^2.1.0-beta but none was installed.
npm ERR! Linux 2.6.32-642.11.1.el6.x86_64
npm ERR! argv "/usr/local/node/bin/node" "/usr/local/node/bin/npm" "install"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE

npm ERR! node-sass@3.13.1 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-sass@3.13.1 install script 'node scripts/install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-sass
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.

For me it looks like something with node js installation is broken.
Can you build other node projects ?

I prefer to install node using https://github.com/creationix/nvm
install npm with cmd npm install -g