2

As of recently, I've started getting warnings when creating a new react app. This happened without me personally doing anything, it just started happening. I copied and pasted all the messages below - as you can see, it catches some exceptions and tells me I need to install dependencies myself.

My questions are

  1. Why is this happening? Again, it just started happening one day without me doing anything.
  2. Is there a way I can get back to where I could just install a react app and none of these warnings come up? Or from here on out, do I need to install these dependencies myself? If so, I wouldn't know how to go about doing that and would appreciate some guidance.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...


> core-js@2.6.12 postinstall C:\Users\Benjamin\PROGRAMMING_PROJECTS\REACT_PROJECTS\testing\node_modules\babel-runtime\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js@3.18.0 postinstall C:\Users\Benjamin\PROGRAMMING_PROJECTS\REACT_PROJECTS\testing\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js-pure@3.18.0 postinstall C:\Users\Benjamin\PROGRAMMING_PROJECTS\REACT_PROJECTS\testing\node_modules\core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"


> ejs@2.7.4 postinstall C:\Users\Benjamin\PROGRAMMING_PROJECTS\REACT_PROJECTS\testing\node_modules\ejs
> node ./postinstall.js

+ react-scripts@4.0.3
+ cra-template@1.1.2
+ react@17.0.2
+ react-dom@17.0.2
added 1909 packages from 708 contributors and audited 1912 packages in 94.802s

149 packages are looking for funding
  run `npm fund` for details

found 3 moderate severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

Initialized a git repository.

Installing template dependencies using npm...
npm WARN @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.15.4 requires a peer of @babel/core@^7.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@3.21.0 requires a peer of 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 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\watchpack-chokidar2\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\webpack-dev-server\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ web-vitals@1.1.2
+ @testing-library/jest-dom@5.14.1
+ @testing-library/react@11.2.7
+ @testing-library/user-event@12.8.3
added 43 packages from 86 contributors and audited 1955 packages in 22.719s

150 packages are looking for funding
  run `npm fund` for details

found 3 moderate severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
Removing template package using npm...

npm WARN @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.15.4 requires a peer of @babel/core@^7.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@3.21.0 requires a peer of 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 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\watchpack-chokidar2\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\webpack-dev-server\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

removed 1 package and audited 1954 packages in 11.143s

150 packages are looking for funding
  run `npm fund` for details

found 3 moderate severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
Git commit not created Error: Command failed: git commit -m "Initialize project using Create React App"
    at checkExecSyncError (child_process.js:760:11)
    at execSync (child_process.js:833:15)
    at tryGitCommit (C:\Users\Benjamin\PROGRAMMING_PROJECTS\REACT_PROJECTS\testing\node_modules\react-scripts\scripts\init.js:62:5)
    at module.exports (C:\Users\Benjamin\PROGRAMMING_PROJECTS\REACT_PROJECTS\testing\node_modules\react-scripts\scripts\init.js:352:25)
    at [eval]:3:14
    at Script.runInThisContext (vm.js:134:12)
    at Object.runInThisContext (vm.js:310:38)
    at internal/process/execution.js:81:19
    at [eval]-wrapper:6:22
    at evalScript (internal/process/execution.js:80:60) {
  status: 128,
  signal: null,
  output: [ null, null, null ],
  pid: 25692,
  stdout: null,
  stderr: null
}
Removing .git directory...

Success! Created testing at C:\Users\Benjamin\PROGRAMMING_PROJECTS\REACT_PROJECTS\testing
Inside that directory, you can run several commands:

  npm start
    Starts the development server.

  npm run build
    Bundles the app into static files for production.

  npm test
    Starts the test runner.

  npm run eject
    Removes this tool and copies build dependencies, configuration files
    and scripts into the app directory. If you do this, you can’t go back!

We suggest that you begin by typing:

  cd testing
  npm start

Happy hacking!
Ben
  • 195
  • 7
  • 1
    Does this answer your question? [Npm audit fix --force react script downgrade automatically](https://stackoverflow.com/questions/67693423/npm-audit-fix-force-react-script-downgrade-automatically) – Andrey Nov 28 '21 at 14:35

0 Answers0