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

[BUG] ember generate fails when ember-cli-workbox is installed #106

Closed
Alonski opened this issue Nov 18, 2020 · 1 comment · Fixed by #110
Closed

[BUG] ember generate fails when ember-cli-workbox is installed #106

Alonski opened this issue Nov 18, 2020 · 1 comment · Fixed by #110
Labels

Comments

@Alonski
Copy link

Alonski commented Nov 18, 2020

Hello,

In one of my ember apps whenever ember g ... is run I get this error:

➜  App git:(branch) ember g service locale         
installing service
Cannot read property 'options' of undefined

Debugging this I found that this fails:

  - stack: TypeError: Cannot read property 'options' of undefined
    at Class.config (/App/node_modules/ember-cli-workbox/index.js:16:31)

The line in question:
https://github.com/BBVAEngineering/ember-cli-workbox/blob/master/index.js#L15

this.app is undefined for some reason while ember g is run causing it to fail.
Config from environment.js:

 workbox: {
            // Configures workbox to only precache SVG images.
            swDest: "/service-workers/sw.js",
            globPatterns: ["**/*.svg"],
            globDirectory: "./images",
            modifyURLPrefix: {
                "": "images/"
            }
        },

Is anything else needed to debug this?

adrigzr added a commit that referenced this issue Jan 31, 2022
adrigzr added a commit that referenced this issue Jan 31, 2022
adrigzr pushed a commit that referenced this issue Feb 1, 2022
# [3.1.0](v3.0.0...v3.1.0) (2022-02-01)

### Features

* update to ember 4.1 ([35d6c01](35d6c01)), closes [#106](#106)
@adrigzr
Copy link
Contributor

adrigzr commented Feb 1, 2022

🎉 This issue has been resolved in version 3.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

2 participants