So I don't know what's going with my computer, everyone I ask is saying this is strange and they never seen it before so I hoping someone here can help me before i just buy another computer lol...jk
This screenshot you see here is what happens after i run "npm create-react-app
idk why it just stays there and it only gives three files instead of giving me all the file i need for the react app (like public, SRC).
If someone sends me the folder with all the correct files Im able to run the react app and work on it, the issue is that Im not being able to create for some reason and my OCD is really killing me on this.
Please and thank you! :)
$ npx create-react-app myapp13
Creating a new React app in C:\Users\joesa\Desktop\myapp13.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
yarn add v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents#1.2.12: The platform "win32" is incompatible with this module.
info "fsevents#1.2.12" is an optional dependency and failed compatibility check.
Excluding it from installation.
info fsevents#2.1.2: The platform "win32" is incompatible with this module.
info "fsevents#2.1.2" is an optional dependency and failed compatibility check.
Excluding it from installation.
[3/4] Linking dependencies...
warning "react-scripts > #typescript-eslint/eslint-plugin > tsutils#3.17.1" has unmet peer dependency "typescript#>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 14 new dependencies.
info Direct dependencies
├─ cra-template#1.0.3
├─ react-dom#16.13.1
├─ react-scripts#3.4.1
└─ react#16.13.1
info All dependencies
├─ #babel/plugin-syntax-typescript#7.10.1
├─ #babel/plugin-transform-flow-strip-types#7.9.0
├─ #babel/plugin-transform-runtime#7.9.0
├─ #babel/plugin-transform-typescript#7.10.1
├─ #babel/preset-typescript#7.9.0
├─ babel-preset-react-app#9.1.2
├─ cra-template#1.0.3
├─ eslint-config-react-app#5.2.1
├─ react-dev-utils#10.2.1
├─ react-dom#16.13.1
├─ react-error-overlay#6.0.7
├─ react-scripts#3.4.1
├─ react#16.13.1
└─ scheduler#0.19.1
Done in 12.46s.
Here you go: https://drive.google.com/drive/folders/1J-z39UQdqV5GP096TDs70m-WzJRiq_bY?usp=sharing
Make sure to run npm install
Try this:
npm uninstall -g create-react-app
npm install -g create-react-app#latest
npx create-react-app testApp
Related
I want to fix one vulnerability and after lot of hit and trial, I want to use the fix given by npm audit fix. The npm audit says:
# Run npm update mkdirp --depth 8 to resolve 10 vulnerabilities
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Critical │ Prototype Pollution in minimist │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ minimist │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ less │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ less > mkdirp > minimist │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://github.com/advisories/GHSA-xvch-5gv4-984h │
└──────────────
Now, I ran the above command and result is:
npm update mkdirp --depth 8
npm WARN deprecated mkdirp#0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN grunt-webpack#2.0.1 requires a peer of webpack#^2.1.0-beta || ^2.2.0-rc || ^2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN karma-webpack#2.0.3 requires a peer of webpack#^1.1.0 || ^2 || ^2.1.0-beta.0 || ^2.2.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN The package style-loader is included as both a dev and production dependency.
npm WARN The package uuid is included as both a dev and production dependency.
+ mkdirp#0.5.6
added 4 packages from 1 contributor, updated 1 package and audited 1827 packages in 8.439s
4 packages are looking for funding
run `npm fund` for details
found 528 vulnerabilities (31 low, 169 moderate, 228 high, 100 critical)
run `npm audit fix` to fix them, or `npm audit` for details
Now if I run npm audit , the vulnerability is not there, but I dont see any changes in package.json file. Only changes are done in package-lock.json which we are not suppose to checkin, How can I have npm audit to change package.json, so that it can be checked in?
Only changes are done in package-lock.json which we are not suppose to checkin
This is wrong, you should check this in. It's the whole point of the file to make sure anyone else using the repo is running the same versions as you.
In answer to your question (a little late), the vulnerability is likely in one of the dependencies of your dependencies if that makes sense. Eg. You have installed package A which has a dependency on package B. Package A will be in your package.json but package B will only be in the lock file.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
yarn add v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents#1.2.13: The platform "win32" is incompatible with this module.
info "fsevents#1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#2.3.2: The platform "win32" is incompatible with this module.
info "fsevents#2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "react-scripts > #typescript-eslint/eslint-plugin > tsutils#3.20.0" has unmet peer dependency "typescript#>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 7 new dependencies.
info Direct dependencies
├─ cra-template#1.1.2
├─ react-dom#17.0.2
├─ react-scripts#4.0.3
└─ react#17.0.2
info All dependencies
├─ cra-template#1.1.2
├─ immer#8.0.1
├─ react-dev-utils#11.0.4
├─ react-dom#17.0.2
├─ react-scripts#4.0.3
├─ react#17.0.2
└─ scheduler#0.20.2
Done in 368.65s.
create-react-app stuck after this. Even after I manually terminated the Job and executed the command "npm start" still not working.
any fixes for this problem ?
One possible option is to try using npm instead of yarn.
npx create-react-app my-app --use-npm
I'm trying to build a Dockerfile with a node and install ReactJS there:
FROM node
WORKDIR /home/node/app
RUN npm install -g create-react-app
RUN create-react-app .
CMD npm start
During the build, the following errors occur, and the corresponding files do not appear in the volume:
Creating a new React app in /home/node/app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
yarn add v1.22.5
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents#1.2.13: The platform "linux" is incompatible with this module.
info "fsevents#1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#2.2.1: The platform "linux" is incompatible with this module.
info "fsevents#2.2.1" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#2.1.3: The platform "linux" is incompatible with this module.
info "fsevents#2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#2.3.1: The platform "linux" is incompatible with this module.
info "fsevents#2.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "react-scripts > #typescript-eslint/eslint-plugin > tsutils#3.17.1" has unmet peer dependency "typescript#>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 6 new dependencies.
info Direct dependencies
├─ cra-template#1.1.1
├─ react-dom#17.0.1
├─ react-scripts#4.0.1
└─ react#17.0.1
info All dependencies
├─ cra-template#1.1.1
├─ react-dev-utils#11.0.1
├─ react-dom#17.0.1
├─ react-scripts#4.0.1
├─ react#17.0.1
└─ scheduler#0.20.1
Done in 49.74s.
Initialized a git repository.
Installing template dependencies using yarnpkg...
yarn add v1.22.5
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents#2.3.1: The platform "linux" is incompatible with this module.
info "fsevents#2.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#1.2.13: The platform "linux" is incompatible with this module.
info "fsevents#1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#2.2.1: The platform "linux" is incompatible with this module.
info "fsevents#2.2.1" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#2.1.3: The platform "linux" is incompatible with this module.
info "fsevents#2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "react-scripts > #typescript-eslint/eslint-plugin > tsutils#3.17.1" has unmet peer dependency "typescript#>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
warning " > #testing-library/user-event#12.6.2" has unmet peer dependency "#testing-library/dom#>=7.21.4".
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 17 new dependencies.
info Direct dependencies
├─ #testing-library/jest-dom#5.11.9
├─ #testing-library/react#11.2.3
├─ #testing-library/user-event#12.6.2
├─ react-dom#17.0.1
├─ react#17.0.1
└─ web-vitals#0.2.4
info All dependencies
├─ #testing-library/dom#7.29.4
├─ #testing-library/jest-dom#5.11.9
├─ #testing-library/react#11.2.3
├─ #testing-library/user-event#12.6.2
├─ #types/aria-query#4.2.1
├─ #types/jest#26.0.20
├─ #types/testing-library__jest-dom#5.9.5
├─ css.escape#1.5.1
├─ css#3.0.0
├─ dom-accessibility-api#0.5.4
├─ lz-string#1.4.4
├─ min-indent#1.0.1
├─ react-dom#17.0.1
├─ react#17.0.1
├─ redent#3.0.0
├─ strip-indent#3.0.0
└─ web-vitals#0.2.4
Done in 10.61s.
Removing template package using yarnpkg...
yarn remove v1.22.5
[1/2] Removing module cra-template...
[2/2] Regenerating lockfile and installing missing dependencies...
info fsevents#2.3.1: The platform "linux" is incompatible with this module.
info "fsevents#2.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#1.2.13: The platform "linux" is incompatible with this module.
info "fsevents#1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#2.2.1: The platform "linux" is incompatible with this module.
info "fsevents#2.2.1" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#2.1.3: The platform "linux" is incompatible with this module.
info "fsevents#2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
warning " > #testing-library/user-event#12.6.2" has unmet peer dependency "#testing-library/dom#>=7.21.4".
warning "react-scripts > #typescript-eslint/eslint-plugin > tsutils#3.17.1" has unmet peer dependency "typescript#>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
success Uninstalled packages.
Done in 10.09s.
Git commit not created Error: Command failed: git commit -m "Initialize project using Create React App"
at checkExecSyncError (node:child_process:682:11)
at execSync (node:child_process:719:15)
at tryGitCommit (/home/node/app/node_modules/react-scripts/scripts/init.js:62:5)
at module.exports (/home/node/app/node_modules/react-scripts/scripts/init.js:352:25)
at [eval]:3:14
at Script.runInThisContext (node:vm:134:12)
at Object.runInThisContext (node:vm:311:38)
at node:internal/process/execution:77:19
at [eval]-wrapper:6:22
at evalScript (node:internal/process/execution:76:60) {
status: 128,
signal: null,
output: [ null, null, null ],
pid: 153,
stdout: null,
stderr: null
}
Removing .git directory...
Success! Created app at /home/node/app
But if I transfer the command create-react-app . to the CMD section, the Dockerfile will be successfully built, but the next time the docker-container is started, there will be an error, since CMD executes the command every time it starts and tries to install the React.
How to make a container with Node correctly and install a ReactJS there?
I got this issue everytime I want to do npx create-react-app my_app
yarn add v1.15.2
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
error eslint#6.2.1: The engine "node" is incompatible with this module.
Expected version "^8.10.0 || ^10.13.0 || >=11.10.1". Got "8.3.0"
But when I do check my versions with nvm and bash here's what I got
$ node -v
v8.16.1
$ npm -v
6.4.1
$ nvm ls
nvm ls
-> v8.16.1
v9.10.1
v12.0.0
system
default -> node (-> v12.0.0)
node -> stable (-> v12.0.0) (default)
stable -> 12.0 (-> v12.0.0) (default)
iojs -> N/A (default)
lts/* -> lts/dubnium (-> N/A)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.16.1
lts/dubnium -> v10.16.3 (-> N/A)
I really don't get why it says while doing the npx command that I got node 8.3.0 and that version appears nowhere
It may be because I've installed node with brew some times ago and it may conflict with nvm settings?
It works when I issue npm install -g create-react-app and create-react-app my-app separately as it's what facebook recommends for old node version
$ npm install -g create-react-app
+ create-react-app#3.1.1
added 91 packages from 45 contributors in 4.491s
$ create-react-app trainin
yarn add v1.15.2
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "react-scripts > #typescript-eslint/eslint-plugin#1.13.0" has incorrect peer dependency "eslint#^5.0.0".
warning "react-scripts > #typescript-eslint/parser#1.13.0" has incorrect peer dependency "eslint#^5.0.0".
warning "react-scripts > #typescript-eslint/eslint-plugin > tsutils#3.17.1" has unmet peer dependency "typescript#>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
success Saved 7 new dependencies.
info Direct dependencies
├─ react-dom#16.9.0
├─ react-scripts#3.1.1
└─ react#16.9.0
info All dependencies
├─ eslint-config-react-app#5.0.1
├─ react-dev-utils#9.0.3
├─ react-dom#16.9.0
├─ react-error-overlay#6.0.1
├─ react-scripts#3.1.1
├─ react#16.9.0
└─ scheduler#0.15.0
✨ Done in 15.45s.
You'd better uninstall the version installed by brew, and setup the default version compatible with npx required.
You can use n package which allow you to switch between multiple node versions
I'm trying to start a Yeoman AngularJS project and I receive the following errors at the end of the project install. I have installed all of these modules via npm install -g karma and npm install -g phantomjs. Why am I still seeing these errors even though I globally installed karma and phantomjs?
├── UNMET PEER DEPENDENCY jasmine-core#*
├── UNMET PEER DEPENDENCY karma#^0.13.0 || >= 0.14.0-rc.0
├── karma-jasmine#0.3.6
├─┬ karma-phantomjs-launcher#0.2.3
│ └── lodash#3.10.1
└── UNMET PEER DEPENDENCY phantomjs#>=1.9
npm WARN karma-phantomjs-launcher#0.2.3 requires a peer of karma#>=0.9 but none was installed.
npm WARN karma-phantomjs-launcher#0.2.3 requires a peer of phantomjs#>=1.9 but none was installed.
npm WARN karma-jasmine#0.3.6 requires a peer of jasmine-core#* but none was installed.
npm WARN grunt-karma#0.12.1 requires a peer of karma#^0.13.0 || >= 0.14.0-rc.0 but none was installed.