Creatiwity / gatsby-plugin-favicon

UNMAINTAINED - Favicon Gatsby plugin
MIT License
166 stars 27 forks source link

module build failed v3.1.6 #60

Open ghost opened 5 years ago

ghost commented 5 years ago

When upgrading from 3.1.5 to 3.1.6, I get this error: Error: Module build failed (from ./node_modules/favicons-webpack-plugin/lib/fa vicons.js): 3:11:45 PM: TypeError: (config.html[platform] || []).map is not a function

ukch commented 5 years ago

I have the same problem, even on version 3.1.5 (freshly installed). I reckon this must be something to do with dependency APIs having changed.

ghost commented 5 years ago

Have you seen this https://github.com/itgalaxy/favicons/issues/268? Hopefully there will soon be a fix! Meanwhile, I've done what was suggested, ie. $ npm install itgalaxy/favicons#v5.4.0, and this works.

julien1619 commented 5 years ago

Indeed the fix in itgalaxy/favicons should be available today. I'll see tomorrow if I need to release a new version of gatsby-favicon-plugin.

iDuckDark commented 5 years ago

Has the issue been resolved yet? I am getting the same error here

julien1619 commented 5 years ago

It seems that we're waiting for this PR https://github.com/itgalaxy/favicons/pull/271 to be merged. As soon as it is done, it should work again.

iDuckDark commented 5 years ago

Thank you for the update!

spences10 commented 5 years ago

Looks like that has been merged now @julien1619 👍

julien1619 commented 5 years ago

Yes, you're right @spences10 ! Normally, you just have to update the npm packages to make it work again. As soon as someone else here can confirm that the bug is now gone, I'll close this issue.

spences10 commented 5 years ago

Oh, so, we just need to update gatsby-plugin-favicon?

Has there been a release? I'm on mobile now but can try kick off another netlify build and confirm that way if needed.

julien1619 commented 5 years ago

@spences10 The itgalaxy/favicons is only pinned by your package-lock.json, so running npm update should do the trick.

ghost commented 5 years ago

Running npm update didn't work for me. I uninstalled, then installed the plugin

julien1619 commented 5 years ago

@janetrimmer Do you have the version of favicons as specified in your package-lock.json before, after npm update and after reinstall?

spences10 commented 5 years ago

Yeah, didn't work for me either :'(

ghost commented 5 years ago

For some reason, I initially had problems runningnpm update. (Permissions issue). When I finally got it running, it didn't alter the version of faviconsin package-lock.json. Before uninstalling gatsby-plugin-favicon, the version of favicons in package-lock.json was 5.4.0. After installing the plugin again, the version became 5.4.1 and gatsby now works for me!

julien1619 commented 5 years ago

Okay I've just read the npm doc again and npm update will only check top level dependencies. npm --depth 4 update should update it correctly.

spences10 commented 5 years ago

I upgraded my package as well, I'm using Yarn

Uninstalled then re-installing worked for me too

janosh commented 5 years ago

I can confirm that removing and reinstalling gatsby-plugin-favicon (using yarn) solves the issue. Didn't try yarn upgrade.