examples icon indicating copy to clipboard operation
examples copied to clipboard

Cannot find module jsx-runtime - web3-session template

Open crimson-med opened this issue 3 years ago • 6 comments

I followed the web3-session installation guide with:

yarn create next-app --example https://github.com/vercel/examples/tree/main/solutions/web3-sessions

I then setup my .env

Then proceeded to run

yarn dev

When I try to access: http://localhost:3000 I get the following error:

event - compiled client and server successfully in 100 ms (336 modules)
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/web3-session/node_modules/react/jsx-runtime' imported from /web3-session/node_modules/@vercel/examples-ui/dist/index.js
Did you mean to import 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'
}
error - Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/web3-session/node_modules/react/jsx-runtime' imported from /web3-session/node_modules/@vercel/examples-ui/dist/index.js
Did you mean to import react/jsx-runtime.js?
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/web3-session/node_modules/react/jsx-runtime' imported from /web3-session/node_modules/@vercel/examples-ui/dist/index.js
Did you mean to import 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',
  page: '/'
}

crimson-med avatar Nov 23 '22 02:11 crimson-med

Same issue, no solution that I've found yet.

evanrosa avatar Dec 01 '22 21:12 evanrosa

same here, and no solution found yet either

Visualieyes avatar Dec 29 '22 07:12 Visualieyes

Has anyone tried to manually adding: npm i jsx-runtime in project root?

mworks-proj avatar Feb 18 '23 19:02 mworks-proj

same here, and no solution found yet either

From root directory have you ran npm instal / i @jsx-runtime?

mworks-proj avatar Feb 27 '23 16:02 mworks-proj

same here, and no solution found yet either

Have you resolved this issue? I'm here to help.

mworks-proj avatar Feb 27 '23 17:02 mworks-proj

In package.json update versions for next, react, react-dom:

{ 
"next": "13.2.4",
"react": "18.2.0",
"react-dom": "18.2.0"
}

then run npm update then run npm upgrade then run npm install This worked for me.

andrewfowl avatar Mar 14 '23 02:03 andrewfowl