Closed facuperezm closed 1 month ago
I get this on other lessons
npm start
> start
> npx --prefix ./epicshop epicshop start
π¨ Let's get learning!
Local: http://localhost:5639
On Your Network: http://192.168.0.110:5639
Press Ctrl+C to stop
β [ERROR] Could not resolve "react-dom/client"
../../../../playground/index.tsx:1:27:
1 β import { createRoot } from 'react-dom/client'
β΅ ~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "react-dom" here because it's not listed as a
dependency of this package:
../../../../../../../../.pnp.cjs:3915:33:
3915 β "packageDependencies": [\
β΅ ~~
You can mark the path "react-dom/client" as external to exclude it from the bundle, which will
remove this error.
β [ERROR] Could not resolve "react/jsx-runtime"
../../../../playground/index.tsx:14:1:
14 β <div
β΅ ^
The Yarn Plug'n'Play manifest forbids importing "react" here because it's not listed as a
dependency of this package:
../../../../../../../../.pnp.cjs:3915:33:
3915 β "packageDependencies": [\
β΅ ~~
You can mark the path "react/jsx-runtime" as external to exclude it from the bundle, which will
remove this error.
β [ERROR] Could not resolve "react-dom/client"
../../../../playground/index.tsx:1:27:
1 β import { createRoot } from 'react-dom/client'
β΅ ~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "react-dom" here because it's not listed as a
dependency of this package:
../../../../../../../../.pnp.cjs:3915:33:
3915 β "packageDependencies": [\
β΅ ~~
You can mark the path "react-dom/client" as external to exclude it from the bundle, which will
remove this error.
β [ERROR] Could not resolve "react/jsx-runtime"
../../../../playground/index.tsx:14:1:
14 β <div
β΅ ^
The Yarn Plug'n'Play manifest forbids importing "react" here because it's not listed as a
dependency of this package:
../../../../../../../../.pnp.cjs:3915:33:
3915 β "packageDependencies": [\
β΅ ~~
You can mark the path "react/jsx-runtime" as external to exclude it from the bundle, which will
remove this error.
β [ERROR] Could not resolve "react-dom/client"
../../../../playground/index.tsx:1:27:
1 β import { createRoot } from 'react-dom/client'
β΅ ~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "react-dom" here because it's not listed as a
dependency of this package:
../../../../../../../../.pnp.cjs:3915:33:
3915 β "packageDependencies": [\
β΅ ~~
You can mark the path "react-dom/client" as external to exclude it from the bundle, which will
remove this error.
β [ERROR] Could not resolve "react/jsx-runtime"
../../../../playground/index.tsx:14:1:
14 β <div
β΅ ^
The Yarn Plug'n'Play manifest forbids importing "react" here because it's not listed as a
dependency of this package:
../../../../../../../../.pnp.cjs:3915:33:
3915 β "packageDependencies": [\
β΅ ~~
You can mark the path "react/jsx-runtime" as external to exclude it from the bundle, which will
remove this error.
Error: Build failed with 2 errors:
../../../../playground/index.tsx:1:27: ERROR: Could not resolve "react-dom/client"
../../../../playground/index.tsx:14:1: ERROR: Could not resolve "react/jsx-runtime"
at failureErrorWithLog (/Users/facuperezm/Documents/personal-projects/epic-react-course/react-fundamentals/epicshop/node_modules/esbuild/lib/main.js:1636:15)
at /Users/facuperezm/Documents/personal-projects/epic-react-course/react-fundamentals/epicshop/node_modules/esbuild/lib/main.js:1048:25
at /Users/facuperezm/Documents/personal-projects/epic-react-course/react-fundamentals/epicshop/node_modules/esbuild/lib/main.js:993:52
at buildResponseToResult (/Users/facuperezm/Documents/personal-projects/epic-react-course/react-fundamentals/epicshop/node_modules/esbuild/lib/main.js:1046:7)
at /Users/facuperezm/Documents/personal-projects/epic-react-course/react-fundamentals/epicshop/node_modules/esbuild/lib/main.js:1075:16
at responseCallbacks.<computed> (/Users/facuperezm/Documents/personal-projects/epic-react-course/react-fundamentals/epicshop/node_modules/esbuild/lib/main.js:697:9)
at handleIncomingPacket (/Users/facuperezm/Documents/personal-projects/epic-react-course/react-fundamentals/epicshop/node_modules/esbuild/lib/main.js:752:9)
at Socket.readFromStdout (/Users/facuperezm/Documents/personal-projects/epic-react-course/react-fundamentals/epicshop/node_modules/esbuild/lib/main.js:673:7)
at Socket.emit (node:events:519:28)
at addChunk (node:internal/streams/readable:561:12) {
errors: [
{
detail: undefined,
id: '',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Could not resolve "react-dom/client"'
},
{
detail: undefined,
id: '',
location: [Object],
notes: [Array],
pluginName: '',
text: 'Could not resolve "react/jsx-runtime"'
}
],
warnings: []
}
Are you installing dependencies with yarn? This project uses npm and is only guaranteed to work with npm
I am using npm only. I just solved it after uninstalling absolutely everything I found related to yarn in my machine. Thanks for your time Kent!
I am able to clone, install, run setup on the app, but when I run the app and open a lesson, I get this error:
my setup is as follows:
I have already tried cloning the repo fresh a couple of times, running just
npm install
, clean installing Node and npm on my machine, restarting, and runningnpm run setup
(which completes successfully). However, the issue persists after Inpm start
the app. While I am able to do the workshop, I can't see my progress because React doesn't even render in the playground, and running tests doesn't work either. It's quite frustrating.