gonzofish / angular-librarian

An Angular 2+ scaffolding setup for creating libraries
https://www.npmjs.com/package/angular-librarian
MIT License
91 stars 9 forks source link

[Migration] ngl build fails - Unexpected token ... #88

Closed tommueller closed 6 years ago

tommueller commented 6 years ago

Thank you @gonzofish for finishing the release! Sorry I haven't posted any feedback, but I was not working during the Christmas and New Years festivities.

The upgrade went pretty smoothly, and I can successfully use ngl serve and ngl test. ngl build however fails, giving me the following error:

[Librarian]: /home/tom/workspace-angular/ng-core/tasks/rollup.js:77
                ...config
                ^^^

SyntaxError: Unexpected token ...
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    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> (/home/tom/workspace-angular/ng-core/tasks/build.js:11:16)

Do you have any idea what breaks the code? Cheers and happy new year! Tom

gonzofish commented 6 years ago

happy new years to you as well! what version of Node (not NPM) are you using? I was able to build both scoped & un-scoped packages

tommueller commented 6 years ago

thanks!

tom ~/workspace-angular/ng-core $ node -v
v6.12.2
gonzofish commented 6 years ago

I would try to update your version of Node to 8, seems like the spread operator with objects isn't supported before version 8:

http://node.green/#ESNEXT-candidate--stage-3--object-rest-spread-properties

I'll make a note in MIGRATION.md once we know its working for you

litzebauer commented 6 years ago

Yes, I had this same issue and I upgrade to Node 8 and no more error.

On Tue, Jan 9, 2018 at 7:42 AM Matt Fehskens notifications@github.com wrote:

I would try to update your version of Node to 8, seems like the spread operator with objects isn't supported before version 8:

http://node.green/#ESNEXT-candidate--stage-3--object-rest-spread-properties

I'll make a note in MIGRATION.md https://github.com/gonzofish/angular-librarian/blob/master/MIGRATION.md once we know its working for you

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gonzofish/angular-librarian/issues/88#issuecomment-356273627, or mute the thread https://github.com/notifications/unsubscribe-auth/ABLc6wIzfybxKdAVs6aXR98gp6mDGWSKks5tI17SgaJpZM4RXpvA .

tommueller commented 6 years ago

@gonzofish 👍 solved it! Running into another issue though, but I'll open a new issue for it, to keep this clean over here!