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

Build Error #81

Closed
larryh opened this issue May 23, 2019 · 7 comments
Closed

Build Error #81

larryh opened this issue May 23, 2019 · 7 comments

Comments

@larryh
Copy link

larryh commented May 23, 2019

Hi,

I have used your addon for quite some time with no problem. I recently upgraded Ember from 3.9 to 3.10. I saw that a newer version of favicon was available (I had 2.0.0 and you are now at 2.1.0).

I upgraded my version and ran into problems. I backed off to 2.0.0 and still had the same problem - even after deleting the contents of /node_modules and doing an npm install.

So I removed favicon from my package.json and the error went away and everything worked fine.

Then I did an ember install ember-cli-favicon, which re-installed 2.1.0. And I got the same problem, listed below. (BTW, I have no idea why this doesn't work.)

Thanks,
Larry

Build Error (Favicon) TypeError: (config.html[platform] || []).map is not a function

========================================================================

ERROR Summary:

  • broccoliBuilderErrorStack: Error: TypeError: (config.html[platform] || []).map is not a function
    at /home/larry/RubyMine/BNC/node_modules/broccoli-favicon/dist/index.js:97:20

  • code: [undefined]

  • codeFrame: TypeError: (config.html[platform] || []).map is not a function

  • errorMessage: TypeError: (config.html[platform] || []).map is not a function
    at Favicon
    -- created here: --
    at Favicon.Plugin (/home/larry/RubyMine/BNC/node_modules/broccoli-plugin/index.js:7:31)
    at Favicon.CachingWriter [as constructor] (/home/larry/RubyMine/BNC/node_modules/broccoli-caching-writer/index.js:18:10)
    at new Favicon (/home/larry/RubyMine/BNC/node_modules/broccoli-favicon/dist/index.js:58:71)
    at Class.treeForPublic (/home/larry/RubyMine/BNC/node_modules/ember-cli-favicon/index.js:61:25)
    at Class._treeFor (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/models/addon.js:701:33)
    at Class.treeFor (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/models/addon.js:661:21)
    at project.addons.reduce (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/broccoli/ember-app.js:721:26)
    at Array.reduce (:null:null)
    at EmberApp._addonTreesFor (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/broccoli/ember-app.js:719:32)
    at EmberApp.addonTreesFor (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/broccoli/ember-app.js:743:17)
    at EmberApp.getPublic (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/broccoli/ember-app.js:1411:33)
    at EmberApp.toArray (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/broccoli/ember-app.js:1678:12)
    at EmberApp.toTree (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/broccoli/ember-app.js:1803:36)
    at module.exports (/home/larry/RubyMine/BNC/ember-cli-build.js:51:14)
    at Builder.readBuildFile (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/models/builder.js:51:14)
    at Builder.setupBroccoliBuilder (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/models/builder.js:65:22)
    at new Builder (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/models/builder.js:31:10)
    at ServeTask.run (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/tasks/serve.js:49:7)
    at Promise.resolve.then (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/models/command.js:239:24)
    at tryCatcher (/home/larry/RubyMine/BNC/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:323:19)
    at invokeCallback (/home/larry/RubyMine/BNC/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:495:31)
    at /home/larry/RubyMine/BNC/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:559:14
    at flush (/home/larry/RubyMine/BNC/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:2402:5)
    at processTicksAndRejections (internal/process/next_tick.js:74:9)
    at process.runNextTicks [as _tickCallback] (internal/process/next_tick.js:51:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:800:11)
    at executeUserCode (internal/bootstrap/node.js:526:15)
    at startMainThreadExecution (internal/bootstrap/node.js:439:3)

-- (end) --

  • errorType: Build Error
  • location:
    • column: [undefined]
    • file: [undefined]
    • line: [undefined]
    • treeDir: [undefined]
  • message: TypeError: (config.html[platform] || []).map is not a function
    at Favicon
    -- created here: --
    at Favicon.Plugin (/home/larry/RubyMine/BNC/node_modules/broccoli-plugin/index.js:7:31)
    at Favicon.CachingWriter [as constructor] (/home/larry/RubyMine/BNC/node_modules/broccoli-caching-writer/index.js:18:10)
    at new Favicon (/home/larry/RubyMine/BNC/node_modules/broccoli-favicon/dist/index.js:58:71)
    at Class.treeForPublic (/home/larry/RubyMine/BNC/node_modules/ember-cli-favicon/index.js:61:25)
    at Class._treeFor (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/models/addon.js:701:33)
    at Class.treeFor (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/models/addon.js:661:21)
    at project.addons.reduce (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/broccoli/ember-app.js:721:26)
    at Array.reduce (:null:null)
    at EmberApp._addonTreesFor (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/broccoli/ember-app.js:719:32)
    at EmberApp.addonTreesFor (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/broccoli/ember-app.js:743:17)
    at EmberApp.getPublic (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/broccoli/ember-app.js:1411:33)
    at EmberApp.toArray (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/broccoli/ember-app.js:1678:12)
    at EmberApp.toTree (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/broccoli/ember-app.js:1803:36)
    at module.exports (/home/larry/RubyMine/BNC/ember-cli-build.js:51:14)
    at Builder.readBuildFile (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/models/builder.js:51:14)
    at Builder.setupBroccoliBuilder (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/models/builder.js:65:22)
    at new Builder (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/models/builder.js:31:10)
    at ServeTask.run (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/tasks/serve.js:49:7)
    at Promise.resolve.then (/home/larry/RubyMine/BNC/node_modules/ember-cli/lib/models/command.js:239:24)
    at tryCatcher (/home/larry/RubyMine/BNC/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:323:19)
    at invokeCallback (/home/larry/RubyMine/BNC/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:495:31)
    at /home/larry/RubyMine/BNC/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:559:14
    at flush (/home/larry/RubyMine/BNC/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:2402:5)
    at processTicksAndRejections (internal/process/next_tick.js:74:9)
    at process.runNextTicks [as _tickCallback] (internal/process/next_tick.js:51:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:800:11)
    at executeUserCode (internal/bootstrap/node.js:526:15)
    at startMainThreadExecution (internal/bootstrap/node.js:439:3)

-- (end) --

  • name: BuildError
  • nodeAnnotation: [undefined]
  • nodeName: Favicon
  • originalErrorMessage: TypeError: (config.html[platform] || []).map is not a function
  • stack: Error: TypeError: (config.html[platform] || []).map is not a function
    at /home/larry/RubyMine/BNC/node_modules/broccoli-favicon/dist/index.js:97:20

=========================================================================

@Exelord
Copy link
Collaborator

Exelord commented May 24, 2019

Ok, this is because of our dependency which introduces a bug: itgalaxy/favicons#268

@Turbo87 thats why I always keep dependencies versions strict. You can't trust them, and they can break the packages any time.

REF: davewasmer/broccoli-favicon#46

@Turbo87
Copy link

Turbo87 commented May 24, 2019

in that case temporary pinning might make sense, but "break packages any time" I don't agree with. also, nested dependencies will still not be pinned, so your sense of safety is only half true.

@Exelord
Copy link
Collaborator

Exelord commented May 24, 2019

"break packages any time"

Thats what happened, right now (any time). All add-ons, apps using this addon will fail now.

Sure, I cannot prevent nested dependencies bugs, but in most cases that blocker in enough to secure from that kind of incidents.

@Turbo87
Copy link

Turbo87 commented May 24, 2019

not entirely true, only apps and addons that don't use a lockfile will break, or those that install the addon right now. but feel free to do what you want here 🤷‍♂

@larryh
Copy link
Author

larryh commented May 24, 2019

I thought that picture looked familiar... @Turbo87 - thanks for the Ember.js plugin for the Rubymine IDE. Rubymine is obviously great for RoR back-ends, but I find it also is good for working with Ember front-ends as well. And your plugin definitely plays a part in that. Once again: thanks!

@ballPointPenguin
Copy link

experiencing same. I was able to fix by adding this line to my ember app's package.json:

"favicons": "github:itgalaxy/favicons#v5.4.0",

per itgalaxy/favicons#268 (comment)

@Exelord
Copy link
Collaborator

Exelord commented Jun 5, 2019

Fixed in latest favicons itgalaxy/favicons#268

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

4 participants