ericalli / static-site-boilerplate

A better workflow for building modern static websites.
http://staticsiteboilerplate.com
MIT License
1.73k stars 165 forks source link

Installation goes wrong #17

Closed wnas closed 5 years ago

wnas commented 5 years ago

Describe the bug When trying to build with 'npm i' I get the following error message:

> node ./config/site.setup.js

/Users/wnas/Documents/workspace/static-site-boilerplate/config/site.setup.js:11
async function runSetup() {
      ^^^^^^^^
SyntaxError: Unexpected token function
    at Object.exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:513:28)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.runMain (module.js:575:10)
    at run (node.js:348:7)
    at startup (node.js:140:9)
    at node.js:463:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! static-site-boilerplate@1.0.0-beta.4 postinstall: `node ./config/site.setup.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the static-site-boilerplate@1.0.0-beta.4 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/wnas/.npm/_logs/2019-02-12T07_27_48_923Z-debug.log

Additional context Add any other context about the problem here.

gavinchua commented 5 years ago

I installed with Yarn & it was working good.

wnas commented 5 years ago

yarn install goes ok, but after that yarn run start goes wrong. as does npm run start.

gavinchua commented 5 years ago

'yarn start' will do

wnas commented 5 years ago
$ cross-env NODE_ENV=development webpack-dev-server --config ./config/webpack.config.js
/Users/wnas/Documents/workspace/static-site-boilerplate/config/site.config.js:45
  )
  ^
SyntaxError: Unexpected token )
    at Object.exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:513:28)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/wnas/Documents/workspace/static-site-boilerplate/config/webpack.config.js:3:16)
    at Module._compile (module.js:541:32)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
wnas commented 5 years ago

turned out, it was the version of node (below 8) that was the culprit. all is solved nowm