epicweb-dev / react-fundamentals

Material for my React Fundamentals Workshop
https://fundamentals.epicreact.dev
Other
5.3k stars 3.21k forks source link

Unable to set up workshop app #379

Closed eubrn closed 2 months ago

eubrn commented 2 months ago

Hi. I am unable to complete the setup process for the workshop. My setup is as follows:

npm: v10.8.3 node: v20.17.0 git: 2.39.5 (Apple Git-154)

When I npm run setup I get following error message.

> setup:custom
> node ./epicshop/setup-custom.js

second error, exiting
Error: Cannot find module 'esbuild'
Require stack:
- /Users/eugen.bernwald/Developer/epicreact/react-fundamentals/node_modules/mdx-bundler/dist/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/Users/eugen.bernwald/Developer/epicreact/react-fundamentals/node_modules/mdx-bundler/dist/index.js:12:39)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at cjsLoader (node:internal/modules/esm/translators:346:17) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/eugen.bernwald/Developer/epicreact/react-fundamentals/node_modules/mdx-bundler/dist/index.js'
  ]
}
    🚨  Failure: Custom Setup. Please review the messages above for information on how to troubleshoot and resolve this issue.

If i manually install esbuild the setup completes. If i then npm start I get another error message:

> start
> npx --prefix ./epicshop epicshop start

npm error code E404
npm error 404 Not Found - GET https://registry.npmjs.org/epicshop - Not found
npm error 404
npm error 404  'epicshop@*' is not in this registry.
npm error 404
npm error 404 Note that you can also install from a
npm error 404 tarball, folder, http url, or git url.
npm error A complete log of this run can be found in: /Users/eugen.bernwald/.npm/_logs/2024-09-25T14_20_37_018Z-debug-0.log
kentcdodds commented 2 months ago

Looks like installation failed. Try running npm install and see what happens there. If that doesn't work, go ahead and clone the repo fresh and just run npm install directly. Make sure if there are errors you report them here.

eubrn commented 2 months ago

I already had a fresh clone. I got the same errors. I found the problem in my .npmrc which contained some bad configuration. Thanks for the hint though! 👍

kentcdodds commented 2 months ago

Oh good! Enjoy the workshop!