Description
The npx command is aborting and doesn't create the application.
I'm using the command:
npx create-react-app appexample
and at the end of the execution it prints:
Error [ERR_INVALID_PACKAGE_TARGET]: Invalid "exports" main target "index.js" defined in the package config /Users/alexkayser/git/apptest/node_modules/is-promise/package.json
at resolveExportsTarget (internal/modules/cjs/loader.js:542:13)
at resolveExportsTarget (internal/modules/cjs/loader.js:581:20)
at applyExports (internal/modules/cjs/loader.js:455:14)
at resolveExports (internal/modules/cjs/loader.js:508:23)
at Function.Module._findPath (internal/modules/cjs/loader.js:632:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1001:27)
at Function.Module._load (internal/modules/cjs/loader.js:884:27)
at Module.require (internal/modules/cjs/loader.js:1074:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (/Users/alexkayser/git/apptest/node_modules/run-async/index.js:3:17) {
code: 'ERR_INVALID_PACKAGE_TARGET'
}
Aborting installation.
node has failed.
Deleting generated file... node_modules
Deleting generated file... package.json
Versions
This is the versions of NPM and Node:
npm --version
6.14.4
node --version
v14.0.0
(the problem is not experienced on node 12.12.0)
Which terms did you search for in User Guide?
npx
create-react-app
Environment
Environment Info:
current version of create-react-app: 3.4.1
running from /usr/local/lib/node_modules/create-react-app
System:
OS: macOS 10.15.4
CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
Binaries:
Node: 14.0.0 - /usr/local/bin/node
Yarn: Not Found
npm: 6.14.4 - /usr/local/bin/npm
Browsers:
Chrome: 81.0.4044.122
Firefox: Not Found
Safari: 13.1
npmPackages:
react: Not Found
react-dom: Not Found
react-scripts: Not Found
npmGlobalPackages:
create-react-app: 3.4.1
Steps to reproduce
A simple new app creation:
1.run the command: npx react-create-app somenamehere
2.it aborts and delete the files
Expected behavior
Expected to create a new react app.
Actual behavior
It's not creating a new react app.