question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pnpm: ERR_MODULE_NOT_FOUND react/jsx-runtime

See original GitHub issue

I 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:open
  • Created a year ago
  • Reactions:2
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Geczycommented, Jul 21, 2022

im using yarn and have the same issue, any update?

1reaction
benjitroschcommented, Jun 21, 2022

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found