Cannot find module, when running in Windows enviroment
See original GitHub issueA project that is a exact clone from Jack Harrington’s nextjs-mf. Nothing has changed. But when I try to run in Windows (only), I got this error:
But when running in linux, everything goes well.
The path in next.config.js
// For SSR, resolve to disk path (or you can use code streaming if you have access)
home: isServer
? path.resolve(
__dirname,
"../home/.next/server/static/runtime/remoteEntry.js"
)
: "home", // for client, treat it as a global
}```
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:7
Top Results From Across the Web
node.js - Nodejs cannot find installed module on Windows
The answer for windows 10 is to set the NODE_PATH in the enviroment variables with C:\Users\User\node_modules. Share.
Read more >Error Nodejs cannot find installed module on Windows
I am learning nodejs at the moment on Windows. Several modules are installed globally with npm.cmd, and nodejs failed to find the installed ......
Read more >[Node.js 12.11+ and Windows 10] Error: Cannot find module ...
My use case: I have TypeScript projects that are coded as ES modules (for example: cedx/coveralls.js or cedx/which.js).
Read more >Fix Global Installs Not Working | "Cannot find module" error FIX
Getting " Cannot find module " after installing something globally (with -g)? Well, this video shows you how to fix global package/module ...
Read more >Error on starting computer - Cannot find module
... starting my computer running on windows 7 : can not find module- ... A message will appear stating that 'The system scan...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Well I found a workaround…
https://github.com/sindresorhus/slash
So, I add this to the project
yarn add slash
and resolve mypdp/next.config.js
like this:Finally, my pdp app run with the Header component from home!
@hugocalheira you are a Crack! I had been trying to solve this error for about 5 days. Thank you very much for sharing man!! 😃