gatsby-plugin-favicon icon indicating copy to clipboard operation
gatsby-plugin-favicon copied to clipboard

module build failed v3.1.6

Open ghost opened this issue 5 years ago • 17 comments

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

ghost avatar May 24 '19 15:05 ghost

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.

ukch avatar May 24 '19 16:05 ukch

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.

ghost avatar May 24 '19 20:05 ghost

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.

julien1619 avatar May 25 '19 17:05 julien1619

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

iDuckDark avatar May 26 '19 23:05 iDuckDark

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.

julien1619 avatar May 27 '19 09:05 julien1619

Thank you for the update!

iDuckDark avatar May 27 '19 12:05 iDuckDark

Looks like that has been merged now @julien1619 👍

spences10 avatar May 27 '19 20:05 spences10

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.

julien1619 avatar May 28 '19 09:05 julien1619

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.

spences10 avatar May 28 '19 09:05 spences10

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

julien1619 avatar May 28 '19 09:05 julien1619

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

ghost avatar May 28 '19 15:05 ghost

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

julien1619 avatar May 28 '19 15:05 julien1619

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

spences10 avatar May 28 '19 15:05 spences10

For some reason, I initially had problems running npm update. (Permissions issue). When I finally got it running, it didn't alter the version of favicons in 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!

ghost avatar May 28 '19 15:05 ghost

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.

julien1619 avatar May 28 '19 15:05 julien1619

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

Uninstalled then re-installing worked for me too

spences10 avatar May 28 '19 15:05 spences10

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

janosh avatar May 30 '19 20:05 janosh