Open spieker opened 8 years ago
I'm also experiencing this where broccoli-asset-rev
is being called with multiple lines. This causes the regexp to fail. In my instance it is being called on:
assets/bootstrap.css-c7ffd8c7a285780039b2366034f3bca2.map */
/*!
* Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license
@spieker I have a workaround however I don't think this is actually a bug in this repo, since this isn't expecting a multiline sourcemap input. My instinct is that the bug is actually in broccoli-asset-rev
, but I don't know much about how this all really works.
If you want to use my workaround you can add my repo to your package.json.
npm install binhums/broccoli-asset-rewrite --save-dev
I'll submit a pull request anyway to highlight the issue / bug fix.
I don't know if this is what is going on here, the stack trace looks very similar:
I get this same error, it's preventing us from upgrading to the latest broccoli-asset-rewrite. We want the speed improvements in the latest release but the changes to the regex do not work with our environment. We have lots of vendor js being imported in ember-cli-build.js thru app.import()
and the regex greedily matches comments at the start of those imports
One workaround is to add assets/vendor.js
to your fingerprint config's ignore
list. (exclude
won't work)
In our case we just renamed the output file from /assets/ted.js
to /assets/app.js
and everything was working again.
Same problem here. I wanted to experiment with some fingerprinting settings locally. I was manually enabling fingerprinting in dev by setting app.options.fingerprint.enabled = true;
in ember-cli-build.js
and running ember build
. I got the same error as @spieker except with vendor.css
.
Everything works fine for a normal production build though: ember build --environment=production
Did the same as @spieker. When step debugging, it looks like the rewrite chokes on the comments added during concatenation.
+1
Build Error (AssetRewrite) in assets/vendor-[fingerprint].css
Cannot read property '2' of null
Stumped!
@omairvaiyani Running into this exact error after upgrading an Ember 3.4 app to Ember 3.5. Did you ever figure this out?
I ran into this again while upgrading from Ember 3.3 to Ember 3.16 (🤞 🐹 🤞), this time in our fingerprinted test-support.js
file. I noticed we never grabbed the broccoli-asset-rev 3.0.0 update, which bumps broccoli-asset-rewrite to 2.0.0, and contains this change: https://github.com/ember-cli/broccoli-asset-rewrite/pull/64/files. This fixed my most recent issue!
If you're running into this still, double check that you're using broccoli-asset-rewrite 2.0.0+ (npm ls broccoli-asset-rewrite
)
I have a project called
Ted
that usesember-simple-auth
. At some point in the ember build pipeline the regex/["'\(=]{1}\s*([^"'\(\)=]*ted\.js[^"'\(\)\\>=]*)(\?[^"'\)> ]*)?\s*[\\]*\s*["'\)> ]{1}/g
is used on the vendor file. Sinceember-simple-auth
has a code part like this"}}{{/crossLink}} if the session is not authenticated.
which leads to this error
Any suggestions for a workaround for now?