如何解决如何在安装时通过 npx 删除 package.json 来解决 react installtion
PS E:\projectss\dipeshchat> npx create-react-app ./
npx: installed 67 in 5.434s
Creating a new React app in E:\projectss\dipeshchat.
Installing packages. This might take a couple of minutes.
Installing react,react-dom,and react-scripts with cra-template...
npm ERR! Unexpected end of JSON input while parsing near '....0.tgz","fileCount":5'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\DELL\AppData\Roaming\npm-cache\_logs\2021-02-08T16_51_02_702Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
Deleting generated file... package.json
Deleting dipeshchat/ from E:\projectss
(node:27344) UnhandledPromiseRejectionWarning: Error: EBUSY: resource busy or locked,rmdir 'E:\projectss\dipeshchat'
at Object.rmdirSync (fs.js:890:10)
at rmdirSync (C:\Users\DELL\AppData\Roaming\npm-cache\_npx\27344\node_modules\create-react-app\node_modules\fs-extra\lib\remove\rimraf.js:264:13)
at Object.rimrafSync [as removeSync] (C:\Users\DELL\AppData\Roaming\npm-cache\_npx\27344\node_modules\create-react-app\node_modules\fs-extra\lib\remove\rimraf.js:243:7)
at C:\Users\DELL\AppData\Roaming\npm-cache\_npx\27344\node_modules\create-react-app\createReactApp.js:567:14
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:27344) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block,or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection,use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:27344) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future,promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
PS E:\projectss\dipeshchat>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。