Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any project generated with CRA is missing modules and/or required files from a variety of dependencies #9400

Closed
james-fourth opened this issue Aug 1, 2020 · 5 comments

Comments

@james-fourth
Copy link

Describe the bug

Any project generated with CRA is missing modules and/or required files from a variety of dependencies

Did you try recovering your dependencies?

Yes, the issue persists for any new project generated with CRA.

Which terms did you search for in User Guide?

I searched for 'missing modules' in the user guide, but honestly didn't expect to find anything since this issue only began in the past couple days.

Environment

Environment Info:

current version of create-react-app: 3.4.1
running from /Users/jjpiv/.config/yarn/global/node_modules/create-react-app

System:
OS: macOS 10.15.5
CPU: (8) x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
Binaries:
Node: 14.4.0 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.4 - /usr/local/bin/npm
Browsers:
Chrome: 83.0.4103.97
Firefox: 77.0.1
Safari: 13.1.1
npmPackages:
react: ^16.13.1 => 16.13.1
react-dom: ^16.13.1 => 16.13.1
react-scripts: 3.4.1 => 3.4.1
npmGlobalPackages:
create-react-app: Not Found

Steps to reproduce

(Write your steps here:)

  1. yarn create react-app test-app
  2. cd test-app
  3. yarn start

Expected behavior

I expected the app to compile successfully and launch a new browser tab to view the default CRA app.

Actual behavior

The following error appears in the console:

`yarn run v1.22.4

$ react-scripts start
internal/modules/cjs/loader.js:1032
throw err;
^

Error: Cannot find module './CodeNode'
Require stack:

  • /Users/jjpiv/Development/test-app/node_modules/source-list-map/lib/SourceListMap.js
  • /Users/jjpiv/Development/test-app/node_modules/source-list-map/lib/index.js
  • /Users/jjpiv/Development/test-app/node_modules/webpack-sources/lib/RawSource.js
  • /Users/jjpiv/Development/test-app/node_modules/webpack-sources/lib/index.js
  • /Users/jjpiv/Development/test-app/node_modules/webpack/lib/Compiler.js
  • /Users/jjpiv/Development/test-app/node_modules/webpack/lib/webpack.js
  • /Users/jjpiv/Development/test-app/node_modules/react-scripts/scripts/start.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1029:15)
    at Function.Module._load (internal/modules/cjs/loader.js:898:27)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object. (/Users/jjpiv/Development/test-app/node_modules/source-list-map/lib/SourceListMap.js:7:18)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/Users/jjpiv/Development/test-app/node_modules/source-list-map/lib/SourceListMap.js',
    '/Users/jjpiv/Development/test-app/node_modules/source-list-map/lib/index.js',
    '/Users/jjpiv/Development/test-app/node_modules/webpack-sources/lib/RawSource.js',
    '/Users/jjpiv/Development/test-app/node_modules/webpack-sources/lib/index.js',
    '/Users/jjpiv/Development/test-app/node_modules/webpack/lib/Compiler.js',
    '/Users/jjpiv/Development/test-app/node_modules/webpack/lib/webpack.js',
    '/Users/jjpiv/Development/test-app/node_modules/react-scripts/scripts/start.js'
    ]
    }
    error Command failed with exit code 1.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`

Screen Shot 2020-06-15 at 4 21 13 PM

Reproducible demo

https://github.com/jjpiv/test-app

@james-fourth
Copy link
Author

If I'm doing something incorrectly that's causing this issue, I'd be glad if someone could enlighten me. Otherwise, it seems like the CRA team really needs to address this issue because it continues to be a problem.

@james-fourth
Copy link
Author

I found this issue was the result of using yarn to start the development server. After removing yarn and then creating a new project, the instructions say to use npm start. Thankfully, this works successfully. Still need to investigate what about using yarn contributes to this problem.

@stale
Copy link

stale bot commented Sep 11, 2020

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Sep 11, 2020
@james-fourth
Copy link
Author

Still looking into this issue.

@stale
Copy link

stale bot commented Oct 4, 2020

This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.

@stale stale bot closed this as completed Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant