create-react-app(npm error) #11129
Unanswered
liaojiawei666
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
when I use create-react-app to create a react project, it's use yarn to create default, and there is no problem with it, but if I use --use-npm to create project, it's not work,why?
npx create-react-app my-app (it's ok, use yarn default)
npx create-react-app my-app --use-npm (error)
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npm ERR! code 1
npm ERR! path C:\project\web-study\my-app\node_modules\fibers
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! �ڴ˽��������һ������һ����Ŀ����Ҫ���ò������ɣ������ӡ�/m�����ء�
npm ERR! fibers.cc
npm ERR! c:\project\web-study\my-app\node_modules\fibers\src\coroutine.h(1): fatal error C1083: ��������ļ �: ��node.h��: No such f
ile or directory [C:\project\web-study\my-app\node_modules\fibers\build\fibers.vcxproj]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error:
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onExit (C:\project\web-study\my-app\node_modules\node-gyp\lib\build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:375:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19041
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\project\web-study\my-app\node_modules\node-gyp\bin\node-gyp.js" "reb
uild"
npm ERR! gyp ERR! cwd C:\project\web-study\my-app\node_modules\fibers
npm ERR! gyp ERR! node -v v14.17.1
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\25474\AppData\Local\npm-cache_logs\2021-06-21T08_24_10_935Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
Deleting generated file... node_modules
(node:13436) UnhandledPromiseRejectionWarning: Error: EBUSY: resource busy or locked, rmdir 'C:\project\web-study\my-app\node_modules\node-sass
'
at Object.rmdirSync (fs.js:912:10)
at rmdirSync (C:\Users\25474\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\fs-extra\lib\remove\rimraf.js:264:13)
at rimrafSync (C:\Users\25474\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\fs-extra\lib\remove\rimraf.js:243:7)
at C:\Users\25474\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\fs-extra\lib\remove\rimraf.js:279:39
at Array.forEach ()
at rmkidsSync (C:\Users\25474\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\fs-extra\lib\remove\rimraf.js:279:26)
at rmdirSync (C:\Users\25474\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\fs-extra\lib\remove\rimraf.js:269:7)
at Object.rimrafSync [as removeSync] (C:\Users\25474\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\fs-extra\lib\remove\rimraf.
js:243:7)
at C:\Users\25474\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\create-react-app\createReactApp.js:554:18
at Array.forEach ()
(Use
node --trace-warnings ...
to show where the warning was created)(node:13436) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async functio
n without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise reje
ction, use the CLI flag
--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)(node:13436) [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.
Beta Was this translation helpful? Give feedback.
All reactions