-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
Cannot find module './components.cjs.development.js' #41965
Comments
There is a box component used on every page, whether thats the layout, page or a component, but for some reason only the nested pages break. |
Is there a way to global set use client on all layouts and pages as that i have found fixes everything. probably due to the use of context inside my Component lib. |
I'm glad I'm not the only one who has this issue, the strange one for me though is I've also ran it in es module mode and it still picks up the .cjs version even though I have a compiled esm version. What I can't get my head around is that it works on the route URL but then when you go to a sub URL it crashes. It's actually stopping my build from being successful |
This one fixed for me due to having the components use context so it was crashing. i just had to add use client to all the pages that had a component on. |
This issue has been automatically marked as stale due to two years of inactivity. It will be closed in 7 days unless there’s further input. If you believe this issue is still relevant, please leave a comment or provide updated details. Thank you. |
Verify canary release
Provide environment information
Operating System:
Platform: darwin
Arch: x64
Version: Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64
Binaries:
Node: 16.15.0
npm: 8.5.5
Yarn: 1.22.15
pnpm: 6.11.0
Relevant packages:
next: 13.0.1-canary.0
eslint-config-next: 13.0.0
react: 18.2.0
react-dom: 18.2.0
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
Im using my own component lib and its working on the homepage but when you go to the list/products page it throw the error.
Cannot find module './components.cjs.development.js'
What is strange is that the file in question is installed as i used it on another page just fine, and then there is no direct link to that file it gets called via the index.js file in the node_modules. which confirms that it is reading the correct filesystem.
Expected Behavior
It should load the file like it does on the previous page.
Link to reproduction
https://github.com/The-Code-Monkey/PaperCMS
To Reproduce
Go to the linked repo and you should be able to see the failed deploy. Its really strange, you might have to load it locally as it runs on dev unless you click the products link, all elements are built using the Box component which is what is failing on the other page. Not sure why.
The text was updated successfully, but these errors were encountered: