pnpm: ERR_MODULE_NOT_FOUND react/jsx-runtime
See original GitHub issueI use pnpm to solve some npm dependencies bugs but now I cannot import react-daisyui
.
Error
➜ my-project-name git:(dark-mode) ✗ npm run dev
> next-js-boilerplate@1.0.0 dev
> next dev
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Loaded env from /home/indicozy/Documents/Projects/oponai/my-project-name/.env
node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/indicozy/Documents/Projects/oponai/my-project-name/node_modules/.pnpm/react-daisyui@2.0.3_tgktzqjq2hhcpfjfdazojt3jfa/node_modules/react/jsx-runtime' imported from /home/indicozy/Documents/Projects/oponai/my-project-name/node_modules/.pnpm/react-daisyui@2.0.3_tgktzqjq2hhcpfjfdazojt3jfa/node_modules/react-daisyui/dist/react-daisyui.modern.js
Did you mean to import react@17.0.2/node_modules/react/jsx-runtime.js?
at new NodeError (node:internal/errors:372:5)
at finalizeResolution (node:internal/modules/esm/resolve:437:11)
at moduleResolve (node:internal/modules/esm/resolve:1009:10)
at defaultResolve (node:internal/modules/esm/resolve:1218:11)
at ESMLoader.resolve (node:internal/modules/esm/loader:580:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:294:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:80:40)
at link (node:internal/modules/esm/module_job:78:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
Stack: NextJS v12.1.6, React v17.0.2, daisyui v2.15.3, react-daisyui v2.0.3
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Cannot find module 'react/jsx-runtime' · Issue #2119 - GitHub
for me it was just an issue because I'm using Linux subsystem for windows with pnpm. so in my node_modules/.modules.yaml i needed to...
Read more >got Can't resolve 'react/jsx-runtime' error while use try to create ...
To solve the error "Module not found: Error: Can't resolve 'react/jsx-runtime'", make sure to update the react package by opening your ...
Read more >Can't resolve 'react-images-uploading' Code Example
Answers related to “Module not found: Can't resolve 'react-images-uploading'”. Module not found: Can't resolve 'react/jsx-runtime' · webpack Module not ...
Read more >storybookjs/storybook (Raised $170.00) - Issuehunt
Storybook Init doesn't work with PNPM. Unfunded#14275created byabhijit-kar ... [Bug]: Module not found: Error: Can't resolve 'react/jsx-runtime'.
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
im using yarn and have the same issue, any update?
Hi @indicozy,
I’ll be looking into this further, sorry for the delay. I’m not too familiar with pnpm so apologies for not testing whether or not it would work with pnpm.
I’ll keep you updated here whenever I find a fix!