问答

CodeSandbox初始化报错

作者:admin 2021-04-20 我要评论

从码云上下载下 CodeSandbox 执行初始化报错 执行yarn报错,执行npm run start报错 执行yarn报错信息如下 包都下载成功了 error D:\test\CodeSandbox-client\node...

在说正事之前,我要推荐一个福利:你还在原价购买阿里云、腾讯云、华为云服务器吗?那太亏啦!来这里,新购、升级、续费都打折,能够为您省60%的钱呢!2核4G企业级云服务器低至69元/年,点击进去看看吧>>>)

从码云上下载下 CodeSandbox 执行初始化报错

执行yarn报错,执行npm run start报错

执行yarn报错信息如下 包都下载成功了

error D:\test\CodeSandbox-client\node_modules\postinstall-postinstall: Command failed.
Exit code: 1
Command: node ./run.js
Arguments:
Directory: D:\test\CodeSandbox-client\node_modules\postinstall-postinstall
Output:
lerna notice cli v3.16.4
lerna info versioning independent
lerna info filter [ '!smooshpack', '!react-smooshpack' ]
lerna info Executing command in 3 packages: "npm run install-dependencies"
sse-loading-screen: warning "@codesandbox/common > @babel/plugin-transform-flow-strip-types@7.4.0" has unmet peer dependency "@babel/core@^7.0.0-0".
sse-loading-screen: warning "@codesandbox/common > @tippy.js/react@2.1.2" has unmet peer dependency "react-dom@>=16.8".
sse-loading-screen: warning "@codesandbox/common > react-icons@2.2.7" has unmet peer dependency "react-dom@^0.14.0 || ^15.0.0 || ^16.0.0".
sse-loading-screen: warning "@codesandbox/common > react-spring@8.0.27" has unmet peer dependency "react-dom@>= 16.8.0".
sse-loading-screen: warning "@codesandbox/common > styled-components@4.2.0" has unmet peer dependency "react-dom@>= 16.3.0".
sse-loading-screen: warning "@codesandbox/common > @babel/plugin-transform-flow-strip-types > @babel/plugin-syntax-flow@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
sse-loading-screen: warning "@codesandbox/common > react-icons > react-icon-base@2.1.0" has unmet peer dependency "react-dom@*".
sse-loading-screen: warning "@codesandbox/common > react-icons > react-icon-base@2.1.0" has unmet peer dependency "prop-types@*".
sse-loading-screen: warning "preact-emotion > create-emotion-styled@9.2.8" has unmet peer dependency "prop-types@15.x".
sse-loading-screen: error D:\test\CodeSandbox-client\standalone-packages\sse-loading-screen\node_modules\deasync: Command failed.
sse-loading-screen: Exit code: 1
sse-loading-screen: Command: node ./build.js
sse-loading-screen: Arguments:
sse-loading-screen: Directory: D:\test\CodeSandbox-client\standalone-packages\sse-loading-screen\node_modules\deasync
sse-loading-screen: Output:
sse-loading-screen: D:\test\CodeSandbox-client\standalone-packages\sse-loading-screen\node_modules\deasync>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
sse-loading-screen: gyp ERR! find VS
sse-loading-screen: gyp ERR! find VS msvs_version not set from command line or npm config
sse-loading-screen: gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
sse-loading-screen: gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
sse-loading-screen: gyp ERR! find VS looking for Visual Studio 2015
sse-loading-screen: gyp ERR! find VS - not found
sse-loading-screen: gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
sse-loading-screen: gyp ERR! find VS
sse-loading-screen: gyp ERR! find VS **************************************************************
sse-loading-screen: gyp ERR! find VS You need to install the latest version of Visual Studio
sse-loading-screen: gyp ERR! find VS including the "Desktop development with C++" workload.
sse-loading-screen: gyp ERR! find VS For more information consult the documentation at:
sse-loading-screen: gyp ERR! find VS https://github.com/nodejs/node-gyp
sse-loading-screen: gyp ERR! find VS **************************************************************
sse-loading-screen: gyp ERR! find VS
sse-loading-screen: gyp ERR! configure error
sse-loading-screen: gyp ERR! stack Error: Could not find any Visual Studio installation to use
sse-loading-screen: gyp ERR! stack     at VisualStudioFinder.fail (C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
sse-loading-screen: gyp ERR! stack     at C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
sse-loading-screen: gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
sse-loading-screen: gyp ERR! stack     at C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
sse-loading-screen: gyp ERR! stack     at C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
sse-loading-screen: gyp ERR! stack     at C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
sse-loading-screen: gyp ERR! stack     at C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
sse-loading-screen: gyp ERR! stack     at ChildProcess.exithandler (child_process.js:315:5)
sse-loading-screen: gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
sse-loading-screen: gyp ERR! stack     at maybeClose (internal/child_process.js:1048:16)
sse-loading-screen: gyp ERR! System Windows_NT 10.0.18363
sse-loading-screen: gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
sse-loading-screen: gyp ERR! cwd D:\test\CodeSandbox-client\standalone-packages\sse-loading-screen\node_modules\deasync
sse-loading-screen: gyp ERR! node -v v14.15.0
sse-loading-screen: gyp ERR! node-gyp -v v5.1.0
sse-loading-screen: gyp ERR! not ok
sse-loading-screen: Build failed
sse-loading-screen: npm ERR! code ELIFECYCLE
sse-loading-screen: npm ERR! errno 1
sse-loading-screen: npm ERR! sse-loading-screen@1.0.0 install-dependencies: `yarn install`
sse-loading-screen: npm ERR! Exit status 1
sse-loading-screen: npm ERR!
sse-loading-screen: npm ERR! Failed at the sse-loading-screen@1.0.0 install-dependencies script.
sse-loading-screen: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
sse-loading-screen: npm ERR! A complete log of this run can be found in:
sse-loading-screen: npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2021-03-12T06_06_50_019Z-debug.log
lerna ERR! npm run install-dependencies exited 1 in 'sse-loading-screen'
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
error Command failed with exit code 1.
error Command failed with exit code 1.
child_process.js:655
    throw err;
    ^

Error: Command failed: yarn run postinstall
lerna notice cli v3.16.4
lerna info versioning independent
lerna info filter [ '!smooshpack', '!react-smooshpack' ]
lerna info Executing command in 3 packages: "npm run install-dependencies"
sse-loading-screen: warning "@codesandbox/common > @babel/plugin-transform-flow-strip-types@7.4.0" has unmet peer dependency "@babel/core@^7.0.0-0".
sse-loading-screen: warning "@codesandbox/common > @tippy.js/react@2.1.2" has unmet peer dependency "react-dom@>=16.8".
sse-loading-screen: warning "@codesandbox/common > react-icons@2.2.7" has unmet peer dependency "react-dom@^0.14.0 || ^15.0.0 || ^16.0.0".
sse-loading-screen: warning "@codesandbox/common > react-spring@8.0.27" has unmet peer dependency "react-dom@>= 16.8.0".
sse-loading-screen: warning "@codesandbox/common > styled-components@4.2.0" has unmet peer dependency "react-dom@>= 16.3.0".
sse-loading-screen: warning "@codesandbox/common > @babel/plugin-transform-flow-strip-types > @babel/plugin-syntax-flow@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
sse-loading-screen: warning "@codesandbox/common > react-icons > react-icon-base@2.1.0" has unmet peer dependency "react-dom@*".
sse-loading-screen: warning "@codesandbox/common > react-icons > react-icon-base@2.1.0" has unmet peer dependency "prop-types@*".
sse-loading-screen: warning "preact-emotion > create-emotion-styled@9.2.8" has unmet peer dependency "prop-types@15.x".
sse-loading-screen: error D:\test\CodeSandbox-client\standalone-packages\sse-loading-screen\node_modules\deasync: Command failed.
sse-loading-screen: Exit code: 1
sse-loading-screen: Command: node ./build.js
sse-loading-screen: Arguments:
sse-loading-screen: Directory: D:\test\CodeSandbox-client\standalone-packages\sse-loading-screen\node_modules\deasync
sse-loading-screen: Output:
sse-loading-screen: D:\test\CodeSandbox-client\standalone-packages\sse-loading-screen\node_modules\deasync>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
sse-loading-screen: gyp ERR! find VS
sse-loading-screen: gyp ERR! find VS msvs_version not set from command line or npm config
sse-loading-screen: gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
sse-loading-screen: gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
sse-loading-screen: gyp ERR! find VS looking for Visual Studio 2015
sse-loading-screen: gyp ERR! find VS - not found
sse-loading-screen: gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
sse-loading-screen: gyp ERR! find VS
sse-loading-screen: gyp ERR! find VS **************************************************************
sse-loading-screen: gyp ERR! find VS You need to install the latest version of Visual Studio
sse-loading-screen: gyp ERR! find VS including the "Desktop development with C++" workload.
sse-loading-screen: gyp ERR! find VS For more information consult the documentation at:
sse-loading-screen: gyp ERR! find VS https://github.com/nodejs/node-gyp
sse-loading-screen: gyp ERR! find VS **************************************************************
sse-loading-screen: gyp ERR! find VS
sse-loading-screen: gyp ERR! configure error
sse-loading-screen: gyp ERR! stack Error: Could not find any Visual Studio installation to use
sse-loading-screen: gyp ERR! stack     at VisualStudioFinder.fail (C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
sse-loading-screen: gyp ERR! stack     at C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
sse-loading-screen: gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
sse-loading-screen: gyp ERR! stack     at C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
sse-loading-screen: gyp ERR! stack     at C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
sse-loading-screen: gyp ERR! stack     at C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
sse-loading-screen: gyp ERR! stack     at C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
sse-loading-screen: gyp ERR! stack     at ChildProcess.exithandler (child_process.js:315:5)
sse-loading-screen: gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
sse-loading-screen: gyp ERR! stack     at maybeClose (internal/child_process.js:1048:16)
sse-loading-screen: gyp ERR! System Windows_NT 10.0.18363
sse-loading-screen: gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
sse-loading-screen: gyp ERR! cwd D:\test\CodeSandbox-client\standalone-packages\sse-loading-screen\node_modules\deasync
sse-loading-screen: gyp ERR! node -v v14.15.0
sse-loading-screen: gyp ERR! node-gyp -v v5.1.0
sse-loading-screen: gyp ERR! not ok
sse-loading-screen: Build failed
sse-loading-screen: npm ERR! code ELIFECYCLE
sse-loading-screen: npm ERR! errno 1
sse-loading-screen: npm ERR! sse-loading-screen@1.0.0 install-dependencies: `yarn install`
sse-loading-screen: npm ERR! Exit status 1
sse-loading-screen: npm ERR!
sse-loading-screen: npm ERR! Failed at the sse-loading-screen@1.0.0 install-dependencies script.
sse-loading-screen: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
sse-loading-screen: npm ERR! A complete log of this run can be found in:
sse-loading-screen: npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2021-03-12T06_06_50_019Z-debug.log
lerna ERR! npm run install-dependencies exited 1 in 'sse-loading-screen'
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
error Command failed with exit code 1.
error Command failed with exit code 1.

    at checkExecSyncError (child_process.js:616:11)
    at execSync (child_process.js:652:15)
    at Object.<anonymous> (D:\test\CodeSandbox-client\node_modules\postinstall-postinstall\run.js:15:5)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47 {
  status: 1,
  signal: null,
  output: [
    null,
    Buffer(1454) [Uint8Array] [
      121,  97, 114, 110,  32, 114, 117, 110,  32, 118,  49,  46,
       50,  50,  46,  52,  10,  36,  32, 121,  97, 114, 110,  32,
      108, 101, 114, 110,  97,  32, 114, 117, 110,  32, 105, 110,
      115, 116,  97, 108, 108,  45, 100, 101, 112, 101, 110, 100,
      101, 110,  99, 105, 101, 115,  32,  45,  45, 115, 116, 114,
      101,  97, 109,  32,  45,  45,  99, 111, 110,  99, 117, 114,
      114, 101, 110,  99, 121,  32,  49,  32,  45,  45, 105, 103,
      110, 111, 114, 101,  32, 115, 109, 111, 111, 115, 104, 112,
       97,  99, 107,  32,
      ... 1354 more items

执行 npm run sart 报错信息如下

 npm run start

> codesandbox@0.1.0 start D:\test\CodeSandbox-client
> yarn build:deps && cross-env NODE_ENV=development lerna run start --scope @codesandbox/common --scope @codesandbox/components --scope app --parallel

yarn run v1.21.1
$ lerna run build:dev
lerna notice cli v3.16.4
lerna info versioning independent
lerna info Executing command in 15 packages: "npm run build:dev"
lerna info run Ran npm script 'build:dev' in 'template-icons' in 5.7s:

> template-icons@1.0.0 build:dev D:\test\CodeSandbox-client\packages\template-icons
> npm run build


> template-icons@1.0.0 build D:\test\CodeSandbox-client\packages\template-icons
> babel src --out-dir lib --extensions '.ts,.tsx'

Successfully compiled 0 files with Babel.
lerna info run Ran npm script 'build:dev' in 'codesandbox-deps' in 9.5s:

> codesandbox-deps@0.1.1 build:dev D:\test\CodeSandbox-client\packages\deps
> yarn build

$ yarn build:clean && yarn build:rollup
$ rimraf dist
$ rollup -c
lerna ERR! npm run build:dev exited 2 in 'codesandbox-api'
lerna ERR! npm run build:dev stdout:

> codesandbox-api@0.0.31 build:dev D:\test\CodeSandbox-client\packages\codesandbox-api
> tsc && rollup -c

../../node_modules/@types/react-native/globals.d.ts(36,15): error TS2300: Duplicate identifier 'FormData'.
../../node_modules/@types/react-native/globals.d.ts(81,5): error TS2717: Subsequent property declarations must have the same type.  Property 'body' must be of type 'string | ArrayBuffer | ArrayBufferView | Blob | FormData | URLSearchParams | ReadableStream<Uint8Array> | null | undefined', but here has type 'string | ArrayBuffer | DataView | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | ... 8 more ... | undefined'.
../../node_modules/@types/react-native/globals.d.ts(107,14): error TS2300: Duplicate identifier 'RequestInfo'.
../../node_modules/@types/react-native/globals.d.ts(126,13): error TS2403: Subsequent variable declarations must have the same type.  Variable 'Response' must be of type '{ new (body?: string | ArrayBuffer | ArrayBufferView | Blob | FormData | URLSearchParams | ReadableStream<Uint8Array> | null | undefined, init?: ResponseInit | undefined): Response; prototype: Response; error(): Response; redirect(url: string, status?: number | undefined): Response; }', but here has type '{ new (body?: string | ArrayBuffer | DataView | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | ... 8 more ... | undefined, init?: ResponseInit | undefined): Response; prototype: Response; error: () => Response; redirect: (url: string, status?: number | undefined) => Response; }'.
../../node_modules/@types/react-native/globals.d.ts(196,5): error TS2717: Subsequent property declarations must have the same type.  Property 'abort' must be of type 'ProgressEvent<XMLHttpRequestEventTarget>', but here has type 'Event'.
../../node_modules/@types/react-native/globals.d.ts(197,5): error TS2717: Subsequent property declarations must have the same type.  Property 'error' must be of type 'ProgressEvent<XMLHttpRequestEventTarget>', but here has type 'Event'.
../../node_modules/@types/react-native/globals.d.ts(198,5): error TS2717: Subsequent property declarations must have the same type.  Property 'load' must be of type 'ProgressEvent<XMLHttpRequestEventTarget>', but here has type 'Event'.
../../node_modules/@types/react-native/globals.d.ts(199,5): error TS2717: Subsequent property declarations must have the same type.  Property 'loadend' must be of type 'ProgressEvent<XMLHttpRequestEventTarget>', but here has type 'Event'.
../../node_modules/@types/react-native/globals.d.ts(200,5): error TS2717: Subsequent property declarations must have the same type.  Property 'loadstart' must be of type 'ProgressEvent<XMLHttpRequestEventTarget>', but here has type 'Event'.
../../node_modules/@types/react-native/globals.d.ts(201,5): error TS2717: Subsequent property declarations must have the same type.  Property 'progress' must be of type 'ProgressEvent<XMLHttpRequestEventTarget>', but here has type 'Event'.
../../node_modules/@types/react-native/globals.d.ts(202,5): error TS2717: Subsequent property declarations must have the same type.  Property 'timeout' must be of type 'ProgressEvent<XMLHttpRequestEventTarget>', but here has type 'Event'.
../../node_modules/@types/react-native/globals.d.ts(206,5): error TS2717: Subsequent property declarations must have the same type.  Property 'onabort' must be of type '((this: XMLHttpRequest, ev: ProgressEvent<EventTarget>) => any) | null', but here has type '((this: XMLHttpRequest, ev: Event) => any) | null'.
../../node_modules/@types/react-native/globals.d.ts(207,5): error TS2717: Subsequent property declarations must have the same type.  Property 'onerror' must be of type '((this: XMLHttpRequest, ev: ProgressEvent<EventTarget>) => any) | null', but here has type '((this: XMLHttpRequest, ev: Event) => any) | null'.
../../node_modules/@types/react-native/globals.d.ts(208,5): error TS2717: Subsequent property declarations must have the same type.  Property 'onload' must be of type '((this: XMLHttpRequest, ev: ProgressEvent<EventTarget>) => any) | null', but here has type '((this: XMLHttpRequest, ev: Event) => any) | null'.
../../node_modules/@types/react-native/globals.d.ts(209,5): error TS2717: Subsequent property declarations must have the same type.  Property 'onloadend' must be of type '((this: XMLHttpRequest, ev: ProgressEvent<EventTarget>) => any) | null', but here has type '((this: XMLHttpRequest, ev: Event) => any) | null'.
../../node_modules/@types/react-native/globals.d.ts(210,5): error TS2717: Subsequent property declarations must have the same type.  Property 'onloadstart' must be of type '((this: XMLHttpRequest, ev: ProgressEvent<EventTarget>) => any) | null', but here has type '((this: XMLHttpRequest, ev: Event) => any) | null'.
../../node_modules/@types/react-native/globals.d.ts(211,5): error TS2717: Subsequent property declarations must have the same type.  Property 'onprogress' must be of type '((this: XMLHttpRequest, ev: ProgressEvent<EventTarget>) => any) | null', but here has type '((this: XMLHttpRequest, ev: Event) => any) | null'.
../../node_modules/@types/react-native/globals.d.ts(212,5): error TS2717: Subsequent property declarations must have the same type.  Property 'ontimeout' must be of type '((this: XMLHttpRequest, ev: ProgressEvent<EventTarget>) => any) | null', but here has type '((this: XMLHttpRequest, ev: Event) => any) | null'.
../../node_modules/@types/react-native/globals.d.ts(243,6): error TS2300: Duplicate identifier 'XMLHttpRequestResponseType'.
../../node_modules/@types/react-native/index.d.ts(9383,18): error TS2717: Subsequent property declarations must have the same type.  Property 'geolocation' must be of type 'Geolocation', but here has type 'GeolocationStatic'.
../../node_modules/@types/react-native/index.d.ts(9386,11): error TS2451: Cannot redeclare block-scoped variable 'navigator'.
../../node_modules/typescript/lib/lib.dom.d.ts(5559,11): error TS2300: Duplicate identifier 'FormData'.
../../node_modules/typescript/lib/lib.dom.d.ts(5569,13): error TS2300: Duplicate identifier 'FormData'.
../../node_modules/typescript/lib/lib.dom.d.ts(19485,13): error TS2451: Cannot redeclare block-scoped variable 'navigator'.
../../node_modules/typescript/lib/lib.dom.d.ts(19892,6): error TS2300: Duplicate identifier 'RequestInfo'.
../../node_modules/typescript/lib/lib.dom.d.ts(20090,6): error TS2300: Duplicate identifier 'XMLHttpRequestResponseType'.

lerna ERR! npm run build:dev stderr:
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! codesandbox-api@0.0.31 build:dev: `tsc && rollup -c`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the codesandbox-api@0.0.31 build:dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2021-03-12T06_09_58_492Z-debug.log

lerna ERR! npm run build:dev exited 2 in 'codesandbox-api'
lerna WARN complete Waiting for 4 child processes to exit. CTRL-C to exit immediately.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! codesandbox@0.1.0 start: `yarn build:deps && cross-env NODE_ENV=development lerna run start --scope @codesandbox/common --scope @codesandbox/components --scope app --parallel`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the codesandbox@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2021-03-12T06_10_11_753Z-debug.log

日志文件

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'start'
1 verbose cli ]
2 info using npm@6.14.4
3 info using node@v14.15.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle codesandbox@0.1.0~prestart: codesandbox@0.1.0
6 info lifecycle codesandbox@0.1.0~start: codesandbox@0.1.0
7 verbose lifecycle codesandbox@0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle codesandbox@0.1.0~start: PATH: C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\test\CodeSandbox-client\node_modules\.bin;C:\Program Files\cmder\vendor\bin;C:\Program Files\cmder\vendor\conemu-maximus5\ConEmu\Scripts;C:\Program Files\cmder\vendor\conemu-maximus5;C:\Program Files\cmder\vendor\conemu-maximus5\ConEmu;C:\Python38\Scripts\;C:\Python38\;C:\Program Files\Java\jdk1.8.0_45\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;E:\apache-maven-3.6.1\bin;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Program Files (x86)\Yarn\bin\;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs\;C:\Program Files\TortoiseGit\bin;C:\Program Files\dotnet\;E:\data\gradle-6.8-all\gradle-6.8\bin;C:\Windows\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Users\Administrator\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\Administrator\AppData\Local\Programs\Python\Python39\;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\AppData\Local\Yarn\bin;C:\Users\Administrator\AppData\Roaming\npm;C:\Users\Administrator\.dotnet\tools;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\cmder
9 verbose lifecycle codesandbox@0.1.0~start: CWD: D:\test\CodeSandbox-client
10 silly lifecycle codesandbox@0.1.0~start: Args: [
10 silly lifecycle   '/d /s /c',
10 silly lifecycle   'yarn build:deps && cross-env NODE_ENV=development lerna run start --scope @codesandbox/common --scope @codesandbox/components --scope app --parallel'
10 silly lifecycle ]
11 silly lifecycle codesandbox@0.1.0~start: Returned: code: 2  signal: null
12 info lifecycle codesandbox@0.1.0~start: Failed to exec start script
13 verbose stack Error: codesandbox@0.1.0 start: `yarn build:deps && cross-env NODE_ENV=development lerna run start --scope @codesandbox/common --scope @codesandbox/components --scope app --parallel`
13 verbose stack Exit status 2
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:315:20)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:315:20)
13 verbose stack     at maybeClose (internal/child_process.js:1048:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid codesandbox@0.1.0
15 verbose cwd D:\test\CodeSandbox-client
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "start"
18 verbose node v14.15.0
19 verbose npm  v6.14.4
20 error code ELIFECYCLE
21 error errno 2
22 error codesandbox@0.1.0 start: `yarn build:deps && cross-env NODE_ENV=development lerna run start --scope @codesandbox/common --scope @codesandbox/components --scope app --parallel`
22 error Exit status 2
23 error Failed at the codesandbox@0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]

各位大佬有遇到嘛,请指点一二感激不尽

###

问题已经解决了,

需要的环境有

  1. Python2.7
  2. nodejs 10.22.1 不能太高
  3. Visual Studio 2019 需要安装桌面C++库
  4. 确保网络可以访问github
###

看這段錯誤信息:

sse-loading-screen: gyp ERR! find VS
sse-loading-screen: gyp ERR! find VS You need to install the latest version of Visual Studio
sse-loading-screen: gyp ERR! find VS including the "Desktop development with C++" workload.
sse-loading-screen: gyp ERR! find VS For more information consult the documentation at:
sse-loading-screen: gyp ERR! find VS https://github.com/nodejs/nod...
sse-loading-screen: gyp ERR! find VS

版权声明:本文转载自网络,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。本站转载出于传播更多优秀技术知识之目的,如有侵权请联系QQ/微信:153890879删除

相关文章
  • nginx响应速度很慢

    nginx响应速度很慢

  • 点击选中的多选框,会在已选那一栏显示

    点击选中的多选框,会在已选那一栏显示

  • PHP 多态的理解

    PHP 多态的理解

  • 关于C语言中static的问题

    关于C语言中static的问题

腾讯云代理商
海外云服务器