Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build: missing sw-toolbox.js.map #42

Closed
bourquep opened this issue Oct 27, 2016 · 10 comments
Closed

Unable to build: missing sw-toolbox.js.map #42

bourquep opened this issue Oct 27, 2016 · 10 comments

Comments

@bourquep
Copy link
Contributor

I am unable to build my ember app with ember build --environment production since integrating broccoli-serviceworker. I get this error:

Build failed.
The Broccoli Plugin: [UglifyWriter] failed with:
Error: ENOENT: no such file or directory, open '/myapp/tmp/uglify_writer-input_base_path-CQGZ0XTh.tmp/0/sw-toolbox.js.map'

Environment:

  • ember-cli: 2.9.1
  • ember: 2.6.1
  • broccoli-serviceworker: 0.1.3
  • node: 4.6.0
@bourquep
Copy link
Contributor Author

I am unable to reproduce this in a brand new Ember app created with ember new. I'll compare build settings, environment and package versions... Tis gonna be a great morning.

@bourquep
Copy link
Contributor Author

I am now able to reproduce with the aforementioned brand new Ember app, by enabling sourcemaps in ember-cli-build.js:

  var app = new EmberApp(defaults, {
    sourcemaps: {
      enabled: true,
      extensions: ['js']
    }
  });

Repro app:

sw-test.zip

Simply run ember build --environment production on this app.

@bourquep bourquep reopened this Oct 27, 2016
@jkleinsc
Copy link
Owner

@bourquep out of curiousity, why do you need sourcemaps in prod?

@bourquep
Copy link
Contributor Author

We're sending uncaught errors to Airbrake, and I had enabled sourcemaps to enable meaningful backtraces in the Airbrake error reports.

Maybe there's another way, I'll investigate.

@bourquep
Copy link
Contributor Author

For now I've disabled sourcemaps in prod builds so I can deploy my new app version with service worker.

@jkleinsc
Copy link
Owner

I see... Not sure why the problem happens, it will require some digging into. I'm thinking the bit of code that includes the already generated sourcemap for sw-toolbox needs to take into account that build setting.

@jkleinsc
Copy link
Owner

@bourquep I found the problem. I'll push a build tomorrow with the fix.

@jkleinsc
Copy link
Owner

@bourquep new version now available: https://www.npmjs.com/package/broccoli-serviceworker

@bourquep
Copy link
Contributor Author

Awesome, thanks for the quick fix & deploy! I'll revert my package.json to the npm registry instead of my fork.

@urbany
Copy link
Contributor

urbany commented Mar 4, 2017

@jkleinsc can we add a different config option, other than debug, to define if the map should exist?
I need to have sourcemaps in staging and production but don't want to run the addon in debug mode. Maybe add a sourcemapsboolean? Thank you very much in advance, awesome addon :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants