Closed akctba closed 4 years ago
Same here.
same
yeah same
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
I was writing this issue before you posted https://github.com/facebook/create-react-app/issues/8897
same
same
same.
Same here
Same
same
I am facing the same problem as well
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.
Same here
same
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?
Dependency broke? Just need to wait for them I guess?
same thing whats the solution
same here any solution?
Same here. It doesn't work any more neither on node 12 nor on 14, the error messages are different bit CRA stopped working :( I am on Mac.
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?
hyeap, updated today
Tried with 12.4, 12.6 and 14.0.0. Same problem here on Windows 10 last version (1903).
Same
if you just want to create react app, you can do this while waiting for a fix:
step 1: yarn init -y
step 2: Insert this to package.json
"resolutions": {
"is-promise": "2.1.0",
"run-async/is-promise": "2.1.0"
}
step 3: yarn add --dev create-react-app
step 4: yarn create-react-app ../my-app
Iām not sure this scheme is the most beneficial.
Same Error Installing Firebase.
Just Wait?
Error [ERR_INVALID_PACKAGE_TARGET]: Invalid "exports" main target "index.js" defined in the package config /C:/Users/.../AppData/Roaming/npm/node_modules/firebase-tools/node_modules/is-promise\package.json
so its not me going cray this happening rn lol
Same for me with Node 12.16.1
I downgraded Node to 12.12.0 and everything works fine, so Node has been screwed up recently
same for me, and create umi failed. node: v13.13.0 npm:6.14.4
Node version > 12.12 is completly done about react Nice x)
Glad I'm not the only one. Was able to create one a few hours ago. Tried again a few minutes ago and had the same error. Using Node v13.11.0
Same here when trying to create a vue/cli app node: 14.0.0 npm: 6.14.4
Same here
node: 14.0.0 npm: 6.14.4
create-react-app broke, so did @nestjs/cli and @vue/cli
same here
if you just want to create react app, you can do this while waiting for a fix: step 1:
yarn init -y
step 2: Insert this to package.json
"resolutions": { "is-promise": "2.1.0", "run-async/is-promise": "2.1.0" }
step 3:
yarn add --dev create-react-app
step 4:
node node_modules/create-react-app/createReactApp.js ../my-app
this one worked for me
I downgraded Node to 12.12.0 and everything works fine, so Node has been screwed up recently
i'v Downgraded to 12.12.0 and now is working fine here
I downgraded Node to 12.12.0 and everything works fine, so Node has been screwed up recently
This works for me. Downgraded my node version to 12.12.0:
$ n 12.12.0
$ npx create-react-app react-sample
Works fine after that. Note that this is a temporary fix. A dependency broke (https://github.com/then/is-promise/pull/15) and they're working on it
I downgraded Node to 12.12.0 and everything works fine, so Node has been screwed up recently
This works for me. Downgraded my node version to 12.0.0:
$ n 12.12.0
$ npx create-react-app react-sample
Works fine after that. Note that this is a temporary fix. A dependency broke (then/is-promise#13) and they're working on it
worked for me too thanks!
@SylCard This happens with 12 as well.
ā² ~/pg npx create-react-app my-app --template redux
npx: installed 99 in 3.742s
Must use import to load ES Module: /Users/gopal/.npm/_npx/21435/lib/node_modules/create-react-app/node_modules/is-promise/index.js
require() of ES modules is not supported.
require() of /Users/gopal/.npm/_npx/21435/lib/node_modules/create-react-app/node_modules/is-promise/index.js from /Users/gopal/.npm/_npx/21435/lib/node_modules/create-react-app/node_modules/run-async/index.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename /Users/gopal/.npm/_npx/21435/lib/node_modules/create-react-app/node_modules/is-promise/index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/gopal/.npm/_npx/21435/lib/node_modules/create-react-app/node_modules/is-promise/package.json.
I was using node v12.16.2
Confirmed that this is working with 12.12.0
Am I the only one getting this error, or is it a problem with the node package manager? I can't seem to run my application on localhost 3000 using docker-compose and its tests, should we just wait or what should I do in this scenario?
frontend@0.1.0 start /app react-scripts start
internal/modules/cjs/loader.js:584 if (e.code !== 'ERR_PACKAGE_PATH_NOT_EXPORTED') throw e; ^
Error [ERR_INVALID_PACKAGE_TARGET]: Invalid "exports" main target "index.js" defined in the package config /app/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.react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the frontend@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2020-04-25T16_54_41_496Z-debug.log
@sabinlungudotcpp What node version are you using? I have seen the error to be different over different node versions.
@sabinlungudotcpp What node version are you using? I have seen the error to be different over different node versions.
I'm using v10.16.0, shall I upgrade it to 12 or do we just have to wait until the developers fix the dependencies?
@sabinlungudotcpp Use exactly 12.12.0, I think that will work based on what I have seen other commenters saying. It worked for me too.
I downgraded Node to 12.12.0 and everything works fine, so Node has been screwed up recently
This works for me. Downgraded my node version to 12.12.0:
$ n 12.12.0
$ npx create-react-app react-sample
Works fine after that. Note that this is a temporary fix. A dependency broke (then/is-promise#15) and they're working on it
How do I upgrade to 12.12.0 from 10.16.0 using the terminal?
@sabinlungudotcpp Use exactly 12.12.0, I think that will work based on what I have seen other commenters saying. It worked for me too.
Can you please tell me which command to use? $ n says that the command isn't found.
@sabinlungudotcpp If you are using NVM you can do
nvm install 12.12.0
nvm use 12.12.0
nvm install 12.12.0
The command doesn't work for me..
@sabinlungudotcpp You need to install nvm to use that command
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.