1

When I run npx create-react-app, I had these errors. Maybe someone knows whats it's wrong? P.S. also had tried npm-install -g create-react-app.

    C:\Users\Deividas\Desktop\PAMEGINIMAS>create-react-app my-app
internal/modules/cjs/loader.js:621
  throw e;
  ^

Error: No valid exports main found for 'C:\Users\Deividas\AppData\Roaming\npm\node_modules\create-react-app\node_modules\is-promise'
    at resolveExportsTarget (internal/modules/cjs/loader.js:618:9)
    at applyExports (internal/modules/cjs/loader.js:499:14)
    at resolveExports (internal/modules/cjs/loader.js:548:12)
    at Function.Module._findPath (internal/modules/cjs/loader.js:650:22)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:948:27)
    at Function.Module._load (internal/modules/cjs/loader.js:854:27)
    at Module.require (internal/modules/cjs/loader.js:1023:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (C:\Users\Deividas\AppData\Roaming\npm\node_modules\create-react-app\node_modules\run-async\index.js:3:17)
    at Module._compile (internal/modules/cjs/loader.js:1128:30) {
  code: 'MODULE_NOT_FOUND'
}

2 Answers 2

1

This seems to be a recent problem with npm. There is an issue open as of the last few hours and it seems like people are working on it. I don't think it's anything to do with yourproject.

The issue

While the issue is being fixed: try installing node version 12.12.0 as shown below (if using nvm) and run create-react-app again.

nvm install 12.12.0
nvm use 12.12.0
Sign up to request clarification or add additional context in comments.

Comments

0

I'd try to clear your cache npm cache clean --force. What version of node and npm are you using?

1 Comment

After npm cache clean --force had the same error. npm version: 6.13.1; node version: v13.3.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.