rustydevs / generator-awesome-webpack-starter

Starter Template for building Webpack templates
MIT License
2 stars 4 forks source link

Fix Travis build by removing Node.js 7 #30

Closed mvasigh closed 5 years ago

mvasigh commented 5 years ago

Fixes #29

yeoman-generator depends on the npm package read-pkg-up which uses async/await syntax unsupported by Node versions earlier than v8.0.0, which is why the Node 7 build is failing and Node 8 build succeeds.

Using Node 7 with nvm:

  console.error node_modules/jest-cli/node_modules/jest-jasmine2/build/jasmine/Env.js:157
    Unhandled error

  console.error node_modules/jest-cli/node_modules/jest-jasmine2/build/jasmine/Env.js:158
    /Users/mvasigh/repositories/generator-awesome-webpack-starter/node_modules/yeoman-generator/node_modules/read-pkg-up/index.js:6
    module.exports = async options => {
                           ^^^^^^^
    SyntaxError: Unexpected identifier
        at ScriptTransformer._transformAndBuildScript (/Users/mvasigh/repositories/generator-awesome-webpack-starter/node_modules/jest-runner/node_modules/jest-runtime/build/script_transformer.js:403:17)
        at ScriptTransformer.transform (/Users/mvasigh/repositories/generator-awesome-webpack-starter/node_modules/jest-runner/node_modules/jest-runtime/build/script_transformer.js:448:19)
        at Runtime._execModule (/Users/mvasigh/repositories/generator-awesome-webpack-starter/node_modules/jest-runner/node_modules/jest-runtime/build/index.js:640:53)
        at Runtime.requireModule (/Users/mvasigh/repositories/generator-awesome-webpack-starter/node_modules/jest-runner/node_modules/jest-runtime/build/index.js:376:14)
        at Runtime.requireModuleOrMock (/Users/mvasigh/repositories/generator-awesome-webpack-starter/node_modules/jest-runner/node_modules/jest-runtime/build/index.js:463:19)
        at Object.<anonymous> (/Users/mvasigh/repositories/generator-awesome-webpack-starter/node_modules/yeoman-generator/lib/index.js:9:19)
        at Runtime._execModule (/Users/mvasigh/repositories/generator-awesome-webpack-starter/node_modules/jest-runner/node_modules/jest-runtime/build/index.js:694:13)
        at Runtime.requireModule (/Users/mvasigh/repositories/generator-awesome-webpack-starter/node_modules/jest-runner/node_modules/jest-runtime/build/index.js:376:14)
        at Runtime.requireModuleOrMock (/Users/mvasigh/repositories/generator-awesome-webpack-starter/node_modules/jest-runner/node_modules/jest-runtime/build/index.js:463:19)
        at Object.require (/Users/mvasigh/repositories/generator-awesome-webpack-starter/generators/app/index.js:2:19)

 FAIL  __tests__/app.js (6.226s)
  generator-awesome-webpack-starter:app
    ✕ creates files (18ms)

  ● generator-awesome-webpack-starter:app › creates files

Using Node 8:

 PASS  __tests__/app.js
  generator-awesome-webpack-starter:app
    ✓ creates files (1ms)

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        1.434s, estimated 7s
Ran all test suites.
coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 19.048% when pulling e62270eb63704790b31885150ec7a3f1b7d5aa77 on mvasigh:fix-travis-build into df53bd71db63177f35ea476925fdd9cd315dfd85 on rustydevs:master.

reflexdemon commented 5 years ago

I have replaced with next LTS 10 and that has fixed this issue. Can you please close this PR?