glimmerjs / glimmer-application-pipeline

Tooling for developing Glimmer standalone apps with ember-cli
MIT License
21 stars 32 forks source link

Versions issue when using RollupWithDependencies #144

Open jorgelainfiesta opened 6 years ago

jorgelainfiesta commented 6 years ago

Hi all,

After struggling with this issue for a while I was finally able to understand what it was about. Every time I tried to use commonjs as described in the guides I got the following error:

Build Error (RollupWithDependencies)

parse is not a function in /Users/jorgelainfiesta/my-app/tmp/rollup_with_dependencies-cache_path-NNQTQ4qh.tmp/src/index.js

Stack Trace and Error Report: /var/folders/lg/7k9tn7x55k1_g2prg29r9ptw0000gn/T/error.dump.6a6e7c7fe5a7df21234c91b87e937fef.log

I found an analogue issue in ng-packager from last year (https://github.com/dherges/ng-packagr/issues/657).

It seems like glimmer-application-pipeline version for rollup causes conflicts when installing the most recent rollup-plugin-commonjs.

As a reference, this project uses rollup 0.41.6 and the current version at the time of posting this 0.57.1. For rollup-plugin-commonjs the latest version is 9.1.0; downgrading to 8.3.0 makes the build work.

Provisional fix

Downgrade rollup-plugin-commonjs to 8.3.0

jorgelainfiesta commented 6 years ago

I think https://github.com/glimmerjs/glimmer-application-pipeline/pull/140/ would fix this issue. Perhaps it'd be a good idea to add a note on the documentation to warn naïve users like myself?

john-griffin commented 6 years ago

Thanks for the solution. Downgrading to 8.3.0 also fixed it for us.