create-react-app icon indicating copy to clipboard operation
create-react-app copied to clipboard

npx aborting creation

Open akctba opened this issue 6 years ago • 80 comments

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.

akctba avatar Apr 25 '20 15:04 akctba

Same here.

johnhunter avatar Apr 25 '20 15:04 johnhunter

same

travisbader avatar Apr 25 '20 15:04 travisbader

yeah same

hugowxyz avatar Apr 25 '20 15:04 hugowxyz

Same issue during the same process with yarn.

Error [ERR_INVALID_PACKAGE_TARGET]: Invalid "exports" main target "index.js" defined in the package config [...]/.config/yarn/global/node_modules/is-promise/package.json

eykrehbein avatar Apr 25 '20 15:04 eykrehbein

https://github.com/then/is-promise/issues/12

johnhunter avatar Apr 25 '20 16:04 johnhunter

I was writing this issue before you posted https://github.com/facebook/create-react-app/issues/8897

apoorvmote avatar Apr 25 '20 16:04 apoorvmote

same

itxtoledo avatar Apr 25 '20 16:04 itxtoledo

same

kharrak avatar Apr 25 '20 16:04 kharrak

same.

zorbill avatar Apr 25 '20 16:04 zorbill

Same here

YukaLangbuana avatar Apr 25 '20 16:04 YukaLangbuana

Same

msmfa avatar Apr 25 '20 16:04 msmfa

same

sbouhaddi avatar Apr 25 '20 16:04 sbouhaddi

I am facing the same problem as well

nj20 avatar Apr 25 '20 16:04 nj20

Same here - good to know that others are having the problem as well. Thought I somehow screwed up my node installation 😱

Edit: I also tried globally installed create-react-app, same issue there.

jpreis avatar Apr 25 '20 16:04 jpreis

Same here

vic2tee4u avatar Apr 25 '20 16:04 vic2tee4u

same

shinoshu avatar Apr 25 '20 16:04 shinoshu

Same here - good to know that others are having the problem as well. Thought I somehow screwed up my node installation 😱

Are you on v14.0.0?

vic2tee4u avatar Apr 25 '20 16:04 vic2tee4u

then/is-promise#12

Dependency broke? Just need to wait for them I guess?

YukaLangbuana avatar Apr 25 '20 16:04 YukaLangbuana

same thing whats the solution

ChristopherNeill avatar Apr 25 '20 16:04 ChristopherNeill

same here any solution?

jasseral avatar Apr 25 '20 16:04 jasseral