Create react-app npx create-react-app failed



总是显示这个:

在c: users asus desktop desktop react1my-app中创建新的React应用程序。

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:UsersASUSDesktopdeskreact1my-appnode_modulescanvas
npm ERR! command failed
npm ERR! command C:WINDOWSsystem32cmd.exe /d /s /c node-gyp rebuild
npm ERR! Warning: Missing input files:
npm ERR! C:GTKbinlibpangoft2-1.0-0.dll
npm ERR! C:GTKbinzlib1.dll
npm ERR! C:GTKbinlibintl-8.dll
npm ERR! C:GTKbinlibgmodule-2.0-0.dll
npm ERR! C:GTKbinlibglib-2.0-0.dll
npm ERR! C:GTKbinlibexpat-1.dll
npm ERR! C:GTKbinlibpng14-14.dll
npm ERR! C:GTKbinlibcairo-2.dll
npm ERR! C:GTKbinlibfontconfig-1.dll
npm ERR! C:GTKbinlibgobject-2.0-0.dll
npm ERR! C:GTKbinlibgthread-2.0-0.dll
npm ERR! C:GTKbinlibpangocairo-1.0-0.dll
npm ERR! C:GTKbinlibfreetype-6.dll
npm ERR! C:GTKbinlibpango-1.0-0.dll
npm ERR! C:GTKbinlibpangowin32-1.0-0.dll
npm ERR! �ڴ˽��������һ������һ����Ŀ����Ҫ���ò������ɣ������ӡ�/m�����ء�
npm ERR!   Backend.cc
npm ERR! c:usersasusdesktopdeskreact1my-appnode_modulescanvassrcbackendbackend.h(3): fatal error C1083: �޷��������ļ�: ��cairo.h��: No such file or directory [C:UsersASUSDesktopdeskreact1my-appnode_modulescanvasbuildcanvas.vcxproj]
npm ERR! (node:16632) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `C:Program Files (x86)Microsoft Visual Studio2017ProfessionalMSBuild15.0BinMSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onExit (C:UsersASUSDesktopdeskreact1my-appnode_modulesnode-gyplibbuild.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Windows_NT 10.0.22463
npm ERR! gyp ERR! command "D:\node.exe" "C:\Users\ASUS\Desktop\desk\react1\my-app\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:UsersASUSDesktopdeskreact1my-appnode_modulescanvas
npm ERR! gyp ERR! node -v v16.6.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:UsersASUSAppDataLocalnpm-cache_logs2021-10-01T12_55_17_325Z-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:fs:1157
return handleErrorFromBinding(ctx);
^
Error: EBUSY: resource busy or locked, rmdir 'C:UsersASUSDesktopdeskreact1my-appnode_modulesnode-sass'
at Object.rmdirSync (node:fs:1157:10)
at rmdirSync (C:UsersASUSAppDataRoamingnpmnode_modulescreate-react-appnode_modulesfs-extralibremoverimraf.js:264:13)
at rimrafSync (C:UsersASUSAppDataRoamingnpmnode_modulescreate-react-appnode_modulesfs-extralibremoverimraf.js:243:7)
at C:UsersASUSAppDataRoamingnpmnode_modulescreate-react-appnode_modulesfs-extralibremoverimraf.js:279:39
at Array.forEach (<anonymous>)
at rmkidsSync (C:UsersASUSAppDataRoamingnpmnode_modulescreate-react-appnode_modulesfs-extralibremoverimraf.js:279:26)
at rmdirSync (C:UsersASUSAppDataRoamingnpmnode_modulescreate-react-appnode_modulesfs-extralibremoverimraf.js:269:7)
at Object.rimrafSync [as removeSync] (C:UsersASUSAppDataRoamingnpmnode_modulescreate-react-appnode_modulesfs-extralibremoverimraf.js:243:7)
at C:UsersASUSAppDataRoamingnpmnode_modulescreate-react-appcreateReactApp.js:554:18
at Array.forEach (<anonymous>) {
errno: -4082,
syscall: 'rmdir',
code: 'EBUSY',
path: 'C:\Users\ASUS\Desktop\desk\react1\my-app\node_modules\node-sass'
}

我曾经使用C代码块,其中有一个名为gtk的文件夹。所以我删除了文件夹,它工作了。

相关内容

  • 没有找到相关文章

最新更新