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

node_modules/preact/compat/server.mjs Module not found: Error: Can't resolve 'preact-render-to-string' in #3095

Closed
rahulbhadhoriya opened this issue Mar 31, 2021 · 5 comments

Comments

@rahulbhadhoriya
Copy link

after version 10.5.13 i am getting this error while building

ERROR in ./node_modules/preact/compat/server.mjs
Module not found: Error: Can't resolve 'preact-render-to-string' in '/Users/B0216312/Desktop/node_modules/preact/compat'
@ ./node_modules/preact/compat/server.mjs 1:0-4:33 1:0-4:33 1:0-4:33
@ ./node_modules/google-maps-react/dist/components/InfoWindow.js
@ ./node_modules/google-maps-react/dist/index.js
@ ./app/modules/homes/pages/broadband/feasibility/Map.js
@ ./app/modules/homes/pages/broadband/feasibility/FeasibilitySmart.js
@ ./app/modules/homes/pages/broadband/feasibility/FeasibilityMain.js
@ ./app/modules/homes/pages/broadband/home-page/HomePage.js
@ ./app/modules/homes/lazy.js
@ ./app/modules/homes/routes.js
@ ./app/modules/homes/App.js
@ ./app/modules/homes/common/containers/Root.js
@ ./app/modules/homes/index.js
@ multi (webpack)-dev-server/client?http://0.0.0.0 (webpack)/hot/dev-server.js @babel/polyfill ./app/modules/homes/index.js

Originally posted by @rahulbhadhoriya in #3061 (comment)

@rahulbhadhoriya
Copy link
Author

downgrading to 10.5.12 works fine.

@JoviDeCroock
Copy link
Member

Hmm I wonder if this is caused by preact/compat not having the preact-render-to-string dependency.

@developit
Copy link
Member

Possibly, yeah. Maybe the upgrade switched his build to use MJS and that caused the import to fail instead of returning undefined?

@dross15
Copy link

dross15 commented Sep 10, 2021

@JoviDeCroock @developit is there any update on this? I am trying to upgrade to Next11, using next-plugin-preact but also encountering this error when running yarn build. I tried downgrading to 10.5.12 but did not have any luck.

@JoviDeCroock
Copy link
Member

@dross15 this has been fixed in the newer versions of next-plugin-preact and @preact/compat

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

5 participants