couds / react-bulma-components

React components for Bulma framework
MIT License
1.2k stars 126 forks source link

[Bug] Next.js throws error when importing Bulma component #324

Closed FunctionDJ closed 3 years ago

FunctionDJ commented 3 years ago

Steps to reproduce: • npm init next-app examplenpm i -D react-bulma-componentsnpm run dev • import a Bulma component into index.js

Is this a Next.js issue, maybe because of Webpack 5? The error messages basically don't contain any meaningful information:


Error: Failed to load /
    at loadComponents (C:\Users\Function\Documents\Git\static\mbsr\next-rebuild\node_modules\next\dist\next-server\server\load-components.js:1:1554)
    at async DevServer.findPageComponents (C:\Users\Function\Documents\Git\static\mbsr\next-rebuild\node_modules\next\dist\next-server\server\next-server.js:76:257)
    at async DevServer.renderToHTML (C:\Users\Function\Documents\Git\static\mbsr\next-rebuild\node_modules\next\dist\next-server\server\next-server.js:137:542)
    at async DevServer.renderToHTML (C:\Users\Function\Documents\Git\static\mbsr\next-rebuild\node_modules\next\dist\server\next-dev-server.js:36:578)
    at async DevServer.render (C:\Users\Function\Documents\Git\static\mbsr\next-rebuild\node_modules\next\dist\next-server\server\next-server.js:74:255)
    at async Object.fn (C:\Users\Function\Documents\Git\static\mbsr\next-rebuild\node_modules\next\dist\next-server\server\next-server.js:58:672)
    at async Router.execute (C:\Users\Function\Documents\Git\static\mbsr\next-rebuild\node_modules\next\dist\next-server\server\router.js:25:67)
    at async DevServer.run (C:\Users\Function\Documents\Git\static\mbsr\next-rebuild\node_modules\next\dist\next-server\server\next-server.js:68:1042)
    at async DevServer.handleRequest (C:\Users\Function\Documents\Git\static\mbsr\next-rebuild\node_modules\next\dist\next-server\server\next-server.js:32:504)```
couds commented 3 years ago

Seems that with webpack 5 the imports were mess up. I will take a look later.

FunctionDJ commented 3 years ago

Thank you! I guess this is a [Bug] then and not a [Help] question

couds commented 3 years ago

@FunctionDJ I just release v4.0.3. can you try it and let me know if the issue persist?

Mause commented 3 years ago

v4.0.3 has fixed the same issue for me 👍

couds commented 3 years ago

I'm closing this. Reopen if this happen again! Thanks =)

FunctionDJ commented 3 years ago

Yep, it's working 👍