Giter VIP home page Giter VIP logo

Comments (10)

spieker avatar spieker commented on May 27, 2024 1

In our case we just renamed the output file from /assets/ted.js to /assets/app.js and everything was working again.

from broccoli-asset-rewrite.

omairvaiyani avatar omairvaiyani commented on May 27, 2024 1

+1

Build Error (AssetRewrite) in assets/vendor-[fingerprint].css
Cannot read property '2' of null

Stumped!

from broccoli-asset-rewrite.

 avatar commented on May 27, 2024

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.

from broccoli-asset-rewrite.

 avatar commented on May 27, 2024

I don't know if this is what is going on here, the stack trace looks very similar:

ember-cli/ember-cli#6265

from broccoli-asset-rewrite.

apellerano-pw avatar apellerano-pw commented on May 27, 2024

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

from broccoli-asset-rewrite.

apellerano-pw avatar apellerano-pw commented on May 27, 2024

One workaround is to add assets/vendor.js to your fingerprint config's ignore list. (exclude won't work)

from broccoli-asset-rewrite.

williamhaley avatar williamhaley commented on May 27, 2024

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

from broccoli-asset-rewrite.

FilmKnurd avatar FilmKnurd commented on May 27, 2024

Did the same as @spieker. When step debugging, it looks like the rewrite chokes on the comments added during concatenation.

from broccoli-asset-rewrite.

BillBrower avatar BillBrower commented on May 27, 2024

@omairvaiyani Running into this exact error after upgrading an Ember 3.4 app to Ember 3.5. Did you ever figure this out?

from broccoli-asset-rewrite.

apellerano-pw avatar apellerano-pw commented on May 27, 2024

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)

from broccoli-asset-rewrite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.