Git Product home page Git Product logo

Comments (9)

ef4 avatar ef4 commented on August 13, 2024 1

The root cause is in source-map-url, which is a dep of fast-sourcemap-concat. I did a patch release of fast-sourcemap-concat that downgrades source-map-url, and it fixes this bug.

Allow your version of fast-sourcemap-concat to update to 1.3.2 and this problem should go away.

from ember-auto-import.

mydea avatar mydea commented on August 13, 2024

I just also ran into this issue. Weirdly, everything was working fine, until suddenly it didn't anymore, after updating dependencies. I tried downgrading ember-auto-import to 1.0.1 but the issue persisted.

from ember-auto-import.

cibernox avatar cibernox commented on August 13, 2024

Same. I had this working but now it fails. I tried downgrading luxon and ember-auto-import but it keeps failing. I'm almost sure that it's failing because of an update in webpack.
(use Ember they said, you won't have to worry about webpack they said...)

After further digging I discovered that the syntax error is in the very end of the eval'ed string, in the webpack comment:

exports.FixedOffsetZone = FixedOffsetZone;
exports.IANAZone = IANAZone;
exports.LocalZone = LocalZone;
exports.Settings = Settings;
sourceURL=webpack://__ember_auto_import__/./node_modules/luxon/build/cjs-browser/luxon.js?

Seems that the last line should be a comment but it's not.

from ember-auto-import.

ef4 avatar ef4 commented on August 13, 2024

I think this is a bug in broccoli-concat. Here's the very end of the module's definition before and after concat:

exports.Settings = Settings;\n//# sourceMappingURL=luxon.js.map\n\n\n//# sourceURL=webpack://__ember_auto_import__/./node_modules/luxon/build/cjs-browser/luxon.js?");
exports.Settings = Settings;\nsourceURL=webpack://__ember_auto_import__/./node_modules/luxon/build/cjs-browser/luxon.js?");

from ember-auto-import.

ef4 avatar ef4 commented on August 13, 2024

@cibernox's repro app stops being broken if you disable sourcemaps:

diff --git a/ember-cli-build.js b/ember-cli-build.js
index dc5a39e..89729fe 100644
--- a/ember-cli-build.js
+++ b/ember-cli-build.js
@@ -5,6 +5,9 @@ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
 module.exports = function(defaults) {
   let app = new EmberAddon(defaults, {
     // Add options here
+    sourcemaps: {
+      enabled: false
+    }
   });

   /*

from ember-auto-import.

cibernox avatar cibernox commented on August 13, 2024

Maybe it's the concatenation of sourcemaps?

from ember-auto-import.

ef4 avatar ef4 commented on August 13, 2024

I'm pretty confident this is a bug in the sourcemap-aware concatenation in either broccoli-concat or fast-sourcemap-concat. If somebody can reduce this failure to a test case there it would help.

For now, the best workaround is disabling sourcemaps in your app.

from ember-auto-import.

jeanduplessis avatar jeanduplessis commented on August 13, 2024

Was able to narrow down the dependency causing the issue to fast-sourcemap-concat 1.3.1 release.
Opened an issue there: ef4/fast-sourcemap-concat#53

from ember-auto-import.

ef4 avatar ef4 commented on August 13, 2024

from ember-auto-import.

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.