Cannot find module jsx-runtime - web3-session template
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: '/'
}
Same issue, no solution that I've found yet.
same here, and no solution found yet either
Has anyone tried to manually adding: npm i jsx-runtime in project root?
same here, and no solution found yet either
From root directory have you ran npm instal / i @jsx-runtime?
same here, and no solution found yet either
Have you resolved this issue? I'm here to help.
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.