i5ting / imove

INACTIVE: Move your mouse, generate code from flow chart
https://www.yuque.com/imove/docs/hvu0md
MIT License
3.75k stars 343 forks source link

安装依赖报错 #87

Closed 17601330731 closed 3 years ago

17601330731 commented 3 years ago

npm ERR! code 1 npm ERR! path C:\Users\EDZ\Desktop\imove\imove\node_modules\cypress npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node index.js --exec install npm ERR! internal/modules/cjs/loader.js:883 npm ERR! throw err; npm ERR! ^ npm ERR! npm ERR! Error: Cannot find module 'minimist' npm ERR! Require stack: npm ERR! - C:\Users\EDZ\Desktop\imove\imove\node_modules\cypress\index.js npm ERR! at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15) npm ERR! at Function.Module._load (internal/modules/cjs/loader.js:725:27) npm ERR! at Module.require (internal/modules/cjs/loader.js:952:19) npm ERR! at require (internal/modules/cjs/helpers.js:88:18) npm ERR! at Object. (C:\Users\EDZ\Desktop\imove\imove\node_modules\cypress\index.js:3:18) npm ERR! at Module._compile (internal/modules/cjs/loader.js:1063:30) npm ERR! at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) npm ERR! at Module.load (internal/modules/cjs/loader.js:928:32) npm ERR! at Function.Module._load (internal/modules/cjs/loader.js:769:14) npm ERR! at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) { npm ERR! code: 'MODULE_NOT_FOUND', npm ERR! requireStack: [ npm ERR! 'C:\Users\EDZ\Desktop\imove\imove\node_modules\cypress\index.js' npm ERR! ] npm ERR! }

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\EDZ\AppData\Local\npm-cache_logs\2021-02-24T03_41_18_171Z-debug.log

SmallStoneSK commented 3 years ago

@17601330731

忽略 cypress 试试

$ CYPRESS_INSTALL_BINARY=0 npm i
skyer83 commented 3 years ago

安装也报错了

D:\Webstorm2018\imove>npm install npm WARN deprecated fsevents@2.1.3: "Please update to latest v2.3 or v2.2" npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

cypress@6.5.0 postinstall D:\Webstorm2018\imove\node_modules\cypress node index.js --exec install

D:\Webstorm2018\imove\node_modules\fs-extra\lib\mkdirs\make-dir.js:85 } catch { ^

SyntaxError: Unexpected token { at createScript (vm.js:80:10) at Object.runInThisContext (vm.js:139:10) at Module._compile (module.js:616:28) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object. (D:\Webstorm2018\imove\node_modules\fs-extra\lib\mkdirs\index.js:3:44) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Module.require (module.js:596:17) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\watchpack-chokidar2\node_modules\chokidar\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@~2.3.1 (node_modules\rollup\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 @octokit/plugin-request-log@1.0.3 requires a peer of @octokit/core@>=3 but none is installed. You must install peer dependencies yourself. npm WARN @pmmmwh/react-refresh-webpack-plugin@0.4.3 requires a peer of type-fest@^0.13.1 but none is installed. You must install peer dependencies yourself. npm WARN @pmmmwh/react-refresh-webpack-plugin@0.4.3 requires a peer of webpack-dev-server@3.x but none is installed. You must install peer dependencies yourself. npm WARN @pmmmwh/react-refresh-webpack-plugin@0.4.3 requires a peer of webpack-hot-middleware@2.x but none is installed. You must install peer dependencies yourself. npm WARN @pmmmwh/react-refresh-webpack-plugin@0.4.3 requires a peer of webpack-plugin-serve@0.x || 1.x but none is installed. You must install peer dependencies yourself. npm WARN eslint-config-standard-jsx@10.0.0 requires a peer of eslint@^7.12.1 but none is installed. You must install peer dependencies yourself. npm WARN rollup-plugin-size-snapshot@0.11.0 requires a peer of rollup@^1.20.0 but none is installed. You must install peer dependencies yourself. npm WARN ts-jest@26.5.2 requires a peer of jest@>=26 <27 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! cypress@6.5.0 postinstall: node index.js --exec install npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the cypress@6.5.0 postinstall 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-02-25T06_04_37_535Z-debug.log

SmallStoneSK commented 3 years ago

@skyer83 看着像是 cypress 安装完之后报错了,你用 CYPRESS_INSTALL_BINARY=0 npm i 的方式忽略掉 cypress,或者先在 package.json 中把 cypress 删除再 npm install 试试

skyer83 commented 3 years ago

在 package.json 去掉 cypress 后再 install ,cypress 的错误是过了,但又抛了另一个错误

D:\Webstorm2018\imove>npm install npm WARN deprecated fsevents@2.1.3: "Please update to latest v2.3 or v2.2" npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

root@ postinstall D:\Webstorm2018\imove lerna init && lerna bootstrap && npm link packages/cli

lerna notice cli v3.22.1 lerna info Updating package.json lerna info Updating lerna.json lerna info Creating packages directory lerna success Initialized Lerna files lerna notice cli v3.22.1 lerna info Bootstrapping 5 packages lerna info Installing external dependencies lerna ERR! npm install exited 1 in '@imove/json-schema-editor' lerna ERR! npm install stderr: npm WARN @imove/json-schema-editor@0.3.2 requires a peer of react-dom@^16.13.1 but none is installed. You must install peer dependencies yourself.

npm ERR! code ETARGET npm ERR! notarget No matching version found for @emotion/styled-base@10.0.31 npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist. npm ERR! notarget npm ERR! notarget It was specified as a dependency of '@imove/json-schema-editor' npm ERR! notarget

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2021-02-25T08_41_28_916Z-debug.log

lerna ERR! npm install exited 1 in '@imove/json-schema-editor' lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! root@ postinstall: lerna init && lerna bootstrap && npm link packages/cli npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the root@ postinstall 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-02-25T08_41_44_230Z-debug.log

SmallStoneSK commented 3 years ago

@skyer83

@imove/json-schema-editor 这个包用不到,我们会删掉,不过这个包安装失败应该不影响你项目运行,你可以再 npm start 试试能不能启动。

skyer83 commented 3 years ago

@SmallStoneSK D:\Webstorm2018\imove>npm start

root@ start D:\Webstorm2018\imove concurrently "lerna run watch --parallel" "cross-env APP_ROOT=example umi dev"

[0] lerna notice cli v3.22.1 [0] lerna info Executing command in 4 packages: "npm run watch" [0] @imove/plugin-store: ┌────────────────────────────────────────────────────────────────────┐ [0] @imove/plugin-store: │ npm update check failed │ [0] @imove/plugin-store: │ Try running with sudo or get access │ [0] @imove/plugin-store: │ to the local update config store via │ [0] @imove/plugin-store: │ sudo chown -R $USER:$(id -gn $USER) C:\Users\Administrator.config │ [0] @imove/plugin-store: └────────────────────────────────────────────────────────────────────┘ [0] @imove/core: > @imove/core@0.3.8 watch D:\Webstorm2018\imove\packages\core [0] @imove/core: > watch "npm run build" ./src [0] @imove/json-schema-editor: > @imove/json-schema-editor@0.3.2 watch D:\Webstorm2018\imove\packages\json-schema-editor [0] @imove/json-schema-editor: > watch "npm run build" ./src [0] @imove/compile-code: > @imove/compile-code@0.1.0 watch D:\Webstorm2018\imove\packages\compile-code [0] @imove/compile-code: > watch "npm run build" ./src [0] @imove/plugin-store: > @imove/plugin-store@0.0.3 watch D:\Webstorm2018\imove\packages\plugin-store [0] @imove/plugin-store: > watch "npm run build" ./src [0] @imove/json-schema-editor: > Watching ./src [0] @imove/compile-code: > Watching ./src [0] @imove/core: > Watching ./src [1] Starting the development server... [0] @imove/plugin-store: > Watching ./src [1] Unexpected reserved word [1] D:\Webstorm2018\imove\node_modules\prettier\third-party.js:9863 [1] for await (const place of this.config.searchPlaces) { [1] ^^^^^ [1] [1] SyntaxError: Unexpected reserved word [1] at createScript (vm.js:80:10) [1] at Object.runInThisContext (vm.js:139:10) [1] at Module._compile (module.js:616:28) [1] at Module._compile (D:\Webstorm2018\imove\node_modules\pirates\lib\index.js:99:24) [1] at Module._extensions..js (module.js:663:10) [1] at Object.newLoader [as .js] (D:\Webstorm2018\imove\node_modules\pirates\lib\index.js:104:7) [1] at Module.load (module.js:565:32) [1] at tryModuleLoad (module.js:505:12) [1] at Function.Module._load (module.js:497:3) [1] at Module.require (module.js:596:17) [1] cross-env APP_ROOT=example umi dev exited with code 0 [0] @imove/core: > @imove/core@0.3.8 build D:\Webstorm2018\imove\packages\core [0] @imove/core: > rollup -c & npm run declare-type [0] @imove/json-schema-editor: > @imove/json-schema-editor@0.3.2 build D:\Webstorm2018\imove\packages\json-schema-editor [0] @imove/json-schema-editor: > rollup -c & npm run declare-type [0] @imove/compile-code: > @imove/compile-code@0.1.0 build D:\Webstorm2018\imove\packages\compile-code [0] @imove/compile-code: > rollup -c & npm run declare-type [0] @imove/plugin-store: > @imove/plugin-store@0.0.3 build D:\Webstorm2018\imove\packages\plugin-store [0] @imove/plugin-store: > rollup -c & npm run declare-type [0] @imove/compile-code: D:\Webstorm2018\imove\node_modules\rollup\dist\shared\loadConfigFile.js:480 [0] @imove/compile-code: ? (await import(url.pathToFileURL(fileName).href)).default [0] @imove/compile-code: ^^^^^^ [0] @imove/compile-code: SyntaxError: Unexpected token import [0] @imove/compile-code: at createScript (vm.js:80:10) [0] @imove/compile-code: at Object.runInThisContext (vm.js:139:10) [0] @imove/compile-code: at Module._compile (module.js:616:28) [0] @imove/compile-code: at Object.Module._extensions..js (module.js:663:10) [0] @imove/compile-code: at Module.load (module.js:565:32) [0] @imove/compile-code: at tryModuleLoad (module.js:505:12) [0] @imove/compile-code: at Function.Module._load (module.js:497:3) [0] @imove/compile-code: at Module.require (module.js:596:17) [0] @imove/compile-code: at require (internal/module.js:11:18) [0] @imove/compile-code: at Object. (D:\Webstorm2018\imove\node_modules\rollup\dist\bin\rollup:22:25) [0] @imove/plugin-store: D:\Webstorm2018\imove\node_modules\rollup\dist\shared\loadConfigFile.js:480 [0] @imove/plugin-store: ? (await import(url.pathToFileURL(fileName).href)).default [0] @imove/plugin-store: ^^^^^^ [0] @imove/plugin-store: SyntaxError: Unexpected token import [0] @imove/plugin-store: at createScript (vm.js:80:10) [0] @imove/plugin-store: at Object.runInThisContext (vm.js:139:10) [0] @imove/plugin-store: at Module._compile (module.js:616:28) [0] @imove/plugin-store: at Object.Module._extensions..js (module.js:663:10) [0] @imove/plugin-store: at Module.load (module.js:565:32) [0] @imove/plugin-store: at tryModuleLoad (module.js:505:12) [0] @imove/plugin-store: at Function.Module._load (module.js:497:3) [0] @imove/plugin-store: at Module.require (module.js:596:17) [0] @imove/plugin-store: at require (internal/module.js:11:18) [0] @imove/plugin-store: at Object. (D:\Webstorm2018\imove\node_modules\rollup\dist\bin\rollup:22:25) [0] @imove/core: D:\Webstorm2018\imove\node_modules\rollup\dist\shared\loadConfigFile.js:480 [0] @imove/core: ? (await import(url.pathToFileURL(fileName).href)).default [0] @imove/core: ^^^^^^ [0] @imove/core: SyntaxError: Unexpected token import [0] @imove/core: at createScript (vm.js:80:10) [0] @imove/core: at Object.runInThisContext (vm.js:139:10) [0] @imove/core: at Module._compile (module.js:616:28) [0] @imove/core: at Object.Module._extensions..js (module.js:663:10) [0] @imove/core: at Module.load (module.js:565:32) [0] @imove/core: at tryModuleLoad (module.js:505:12) [0] @imove/core: at Function.Module._load (module.js:497:3) [0] @imove/core: at Module.require (module.js:596:17) [0] @imove/core: at require (internal/module.js:11:18) [0] @imove/core: at Object. (D:\Webstorm2018\imove\node_modules\rollup\dist\bin\rollup:22:25) [0] @imove/json-schema-editor: D:\Webstorm2018\imove\node_modules\rollup\dist\shared\loadConfigFile.js:480 [0] @imove/json-schema-editor: ? (await import(url.pathToFileURL(fileName).href)).default [0] @imove/json-schema-editor: ^^^^^^ [0] @imove/json-schema-editor: SyntaxError: Unexpected token import [0] @imove/json-schema-editor: at createScript (vm.js:80:10) [0] @imove/json-schema-editor: at Object.runInThisContext (vm.js:139:10) [0] @imove/json-schema-editor: at Module._compile (module.js:616:28) [0] @imove/json-schema-editor: at Object.Module._extensions..js (module.js:663:10) [0] @imove/json-schema-editor: at Module.load (module.js:565:32) [0] @imove/json-schema-editor: at tryModuleLoad (module.js:505:12) [0] @imove/json-schema-editor: at Function.Module._load (module.js:497:3) [0] @imove/json-schema-editor: at Module.require (module.js:596:17) [0] @imove/json-schema-editor: at require (internal/module.js:11:18) [0] @imove/json-schema-editor: at Object. (D:\Webstorm2018\imove\node_modules\rollup\dist\bin\rollup:22:25) [0] @imove/core: > @imove/core@0.3.8 declare-type D:\Webstorm2018\imove\packages\core [0] @imove/core: > tsc --emitDeclarationOnly [0] @imove/json-schema-editor: > @imove/json-schema-editor@0.3.2 declare-type D:\Webstorm2018\imove\packages\json-schema-editor [0] @imove/json-schema-editor: > tsc --emitDeclarationOnly [0] @imove/plugin-store: > @imove/plugin-store@0.0.3 declare-type D:\Webstorm2018\imove\packages\plugin-store [0] @imove/plugin-store: > tsc --emitDeclarationOnly [0] @imove/compile-code: > @imove/compile-code@0.1.0 declare-type D:\Webstorm2018\imove\packages\compile-code [0] @imove/compile-code: > tsc --emitDeclarationOnly [0] @imove/json-schema-editor: src/components/add-node.tsx(2,32): error TS2307: Cannot find module 'antd' or its corresponding type declarations. [0] @imove/json-schema-editor: src/components/add-node.tsx(3,32): error TS2307: Cannot find module 'react-i18next' or its corresponding type declarations. [0] @imove/json-schema-editor: src/components/field-input.tsx(2,20): error TS2307: Cannot find module '@emotion/styled' or its corresponding type declarations. [0] @imove/json-schema-editor: src/components/field-input.tsx(3,42): error TS2307: Cannot find module 'antd' or its corresponding type declarations. [0] @imove/json-schema-editor: src/components/field-input.tsx(4,32): error TS2307: Cannot find module 'react-i18next' or its corresponding type declarations. [0] @imove/json-schema-editor: src/components/layout.tsx(3,26): error TS2307: Cannot find module '@emotion/core' or its corresponding type declarations. [0] @imove/json-schema-editor: src/components/layout.tsx(4,24): error TS2307: Cannot find module 'antd' or its corresponding type declarations. [0] @imove/json-schema-editor: src/components/layout.tsx(5,32): error TS2307: Cannot find module 'react-i18next' or its corresponding type declarations. [0] @imove/json-schema-editor: src/components/layout.tsx(37,7): error TS2322: Type '{ children: (false | Element)[]; className: string; css: any; }' is not assignable to type 'DetailedHTMLProps<HTMLAttributes, HTMLDivElement>'. [0] @imove/json-schema-editor: Property 'css' does not exist on type 'DetailedHTMLProps<HTMLAttributes, HTMLDivElement>'. [0] @imove/json-schema-editor: src/components/schema-form.tsx(2,21): error TS2307: Cannot find module '@emotion/core' or its corresponding type declarations. [0] @imove/json-schema-editor: src/components/schema-form.tsx(3,29): error TS2307: Cannot find module 'lodash-es' or its corresponding type declarations. [0] @imove/json-schema-editor: src/components/schema-head.tsx(3,21): error TS2307: Cannot find module '@emotion/core' or its corresponding type declarations. [0] @imove/json-schema-editor: src/components/schema-head.tsx(4,20): error TS2307: Cannot find module '@emotion/styled' or its corresponding type declarations. [0] @imove/json-schema-editor: src/components/schema-head.tsx(5,60): error TS2307: Cannot find module 'antd' or its corresponding type declarations. [0] @imove/json-schema-editor: src/components/schema-head.tsx(6,37): error TS2307: Cannot find module 'antd/lib/checkbox' or its corresponding type declarations. [0] @imove/json-schema-editor: src/components/schema-head.tsx(7,32): error TS2307: Cannot find module 'react-i18next' or its corresponding type declarations. [0] @imove/json-schema-editor: src/components/schema-head.tsx(38,17): error TS7006: Parameter 'prev' implicitly has an 'any' type. [0] @imove/json-schema-editor: src/components/schema-item.tsx(2,21): error TS2307: Cannot find module '@emotion/core' or its corresponding type declarations. [0] @imove/json-schema-editor: src/components/schema-item.tsx(3,50): error TS2307: Cannot find module 'antd' or its corresponding type declarations. [0] @imove/json-schema-editor: src/components/schema-item.tsx(4,32): error TS2307: Cannot find module 'react-i18next' or its corresponding type declarations. [0] @imove/json-schema-editor: src/components/schema-item.tsx(40,17): error TS7006: Parameter 'prev' implicitly has an 'any' type. [0] @imove/json-schema-editor: src/components/schema-item.tsx(82,10): error TS2322: Type '{ children: (Element | null)[]; css: { marginTop: string; }; }' is not assignable to type 'DetailedHTMLProps<HTMLAttributes, HTMLDivElement>'. [0] @imove/json-schema-editor: Property 'css' does not exist on type 'DetailedHTMLProps<HTMLAttributes, HTMLDivElement>'. [0] @imove/json-schema-editor: src/components/schema-item.tsx(139,35): error TS2322: Type '{ children: ReactChild; css: { marginTop: string; }; }' is not assignable to type 'DetailedHTMLProps<HTMLAttributes, HTMLDivElement>'. [0] @imove/json-schema-editor: Property 'css' does not exist on type 'DetailedHTMLProps<HTMLAttributes, HTMLDivElement>'. [0] @imove/json-schema-editor: src/i18n/index.ts(1,18): error TS2307: Cannot find module 'i18next' or its corresponding type declarations. [0] @imove/json-schema-editor: src/i18n/index.ts(2,34): error TS2307: Cannot find module 'react-i18next' or its corresponding type declarations. [0] @imove/json-schema-editor: src/index.tsx(3,29): error TS2307: Cannot find module '@emotion/core' or its corresponding type declarations. [0] @imove/json-schema-editor: src/index.tsx(4,32): error TS2307: Cannot find module 'react-i18next' or its corresponding type declarations. [0] @imove/json-schema-editor: src/reducer/schema.ts(2,41): error TS2307: Cannot find module 'lodash-es' or its corresponding type declarations. [0] @imove/json-schema-editor: src/reducer/schema.ts(24,21): error TS7006: Parameter 'item' implicitly has an 'any' type. [0] @imove/json-schema-editor: src/store/schema.ts(2,33): error TS2307: Cannot find module 'react-tracked' or its corresponding type declarations. [0] @imove/json-schema-editor: src/store/ui.ts(2,33): error TS2307: Cannot find module 'react-tracked' or its corresponding type declarations. [0] @imove/json-schema-editor: src/utils/schema.ts(38,14): error TS2790: The operand of a 'delete' operator must be optional. [0] @imove/json-schema-editor: src/utils/styles/common.ts(1,21): error TS2307: Cannot find module '@emotion/core' or its corresponding type declarations. [0] @imove/json-schema-editor: src/utils/styles/common.ts(2,20): error TS2307: Cannot find module '@emotion/styled' or its corresponding type declarations. [0] @imove/json-schema-editor: src/utils/styles/common.ts(10,8): error TS2307: Cannot find module '@ant-design/icons' or its corresponding type declarations. [0] @imove/json-schema-editor: src/utils/styles/global.ts(1,21): error TS2307: Cannot find module '@emotion/core' or its corresponding type declarations. [0] @imove/json-schema-editor: npm ERR! code ELIFECYCLE [0] @imove/json-schema-editor: npm ERR! errno 1 [0] @imove/json-schema-editor: npm ERR! @imove/json-schema-editor@0.3.2 declare-type: tsc --emitDeclarationOnly [0] @imove/json-schema-editor: npm ERR! Exit status 1 [0] @imove/json-schema-editor: npm ERR! [0] @imove/json-schema-editor: npm ERR! Failed at the @imove/json-schema-editor@0.3.2 declare-type script. [0] @imove/json-schema-editor: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. [0] @imove/json-schema-editor: ┌────────────────────────────────────────────────────────────────────┐ [0] @imove/json-schema-editor: │ npm update check failed │ [0] @imove/json-schema-editor: │ Try running with sudo or get access │ [0] @imove/json-schema-editor: │ to the local update config store via │ [0] @imove/json-schema-editor: │ sudo chown -R $USER:$(id -gn $USER) C:\Users\Administrator.config │ [0] @imove/json-schema-editor: └────────────────────────────────────────────────────────────────────┘ [0] @imove/json-schema-editor: npm ERR! A complete log of this run can be found in: [0] @imove/json-schema-editor: npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2021-02-25T09_19_04_404Z-debug.log [0] @imove/json-schema-editor: npm ERR! code ELIFECYCLE [0] @imove/json-schema-editor: npm ERR! errno 1 [0] @imove/json-schema-editor: npm ERR! @imove/json-schema-editor@0.3.2 build: rollup -c & npm run declare-type [0] @imove/json-schema-editor: npm ERR! Exit status 1 [0] @imove/json-schema-editor: npm ERR! [0] @imove/json-schema-editor: npm ERR! Failed at the @imove/json-schema-editor@0.3.2 build script. [0] @imove/json-schema-editor: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. [0] @imove/json-schema-editor: npm ERR! A complete log of this run can be found in: [0] @imove/json-schema-editor: npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2021-02-25T09_19_04_513Z-debug.log [0] @imove/core: src/components/codeRun/index.tsx(16,34): error TS2307: Cannot find module '@imove/compile-code' or its corresponding type declarations. [0] @imove/core: src/mods/header/export/exportModal.tsx(9,35): error TS2307: Cannot find module '@imove/compile-code' or its corresponding type declarations. [0] @imove/core: npm ERR! code ELIFECYCLE [0] @imove/core: npm ERR! errno 2 [0] @imove/core: npm ERR! @imove/core@0.3.8 declare-type: tsc --emitDeclarationOnly [0] @imove/core: npm ERR! Exit status 2 [0] @imove/core: npm ERR! [0] @imove/core: npm ERR! Failed at the @imove/core@0.3.8 declare-type script. [0] @imove/core: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. [0] @imove/core: npm ERR! A complete log of this run can be found in: [0] @imove/core: npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2021-02-25T09_19_09_088Z-debug.log [0] @imove/core: npm ERR! code ELIFECYCLE [0] @imove/core: npm ERR! errno 2 [0] @imove/core: npm ERR! @imove/core@0.3.8 build: rollup -c & npm run declare-type [0] @imove/core: npm ERR! Exit status 2 [0] @imove/core: npm ERR! [0] @imove/core: npm ERR! Failed at the @imove/core@0.3.8 build script. [0] @imove/core: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. [0] @imove/core: npm ERR! A complete log of this run can be found in: [0] @imove/core: npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2021-02-25T09_19_09_117Z-debug.log

skyer83 commented 3 years ago

启失败了

SmallStoneSK commented 3 years ago

@skyer83

你这个报错应该是各个包之间没有 link

你先把 packages/json-schema-editor 这个删掉,然后在根目录下执行 lerna bootstrap 后再启动试试

skyer83 commented 3 years ago

@SmallStoneSK

packages/json-schema-editor 目录去掉了,lerna bootstrap 也执行了(之前没安装,先执行了:npm install --global lerna)

D:\Webstorm2018\imove>lerna bootstrap info cli using local version of lerna lerna notice cli v3.22.1 lerna info Bootstrapping 4 packages lerna info Symlinking packages and binaries lerna WARN EREPLACE_EXIST @imove/compile-code is already installed for @imove/cli. Replacing with symlink... lerna success Bootstrapped 4 packages

D:\Webstorm2018\imove>npm start

root@ start D:\Webstorm2018\imove concurrently "lerna run watch --parallel" "cross-env APP_ROOT=example umi dev"

[0] lerna notice cli v3.22.1 [0] lerna info Executing command in 3 packages: "npm run watch" [0] @imove/core: > @imove/core@0.3.8 watch D:\Webstorm2018\imove\packages\core [0] @imove/core: > watch "npm run build" ./src [0] @imove/plugin-store: > @imove/plugin-store@0.0.3 watch D:\Webstorm2018\imove\packages\plugin-store [0] @imove/plugin-store: > watch "npm run build" ./src [0] @imove/compile-code: > @imove/compile-code@0.1.0 watch D:\Webstorm2018\imove\packages\compile-code [0] @imove/compile-code: > watch "npm run build" ./src [1] Starting the development server... [0] @imove/plugin-store: > Watching ./src [0] @imove/compile-code: > Watching ./src [0] @imove/core: > Watching ./src [1] Unexpected reserved word [1] D:\Webstorm2018\imove\node_modules\prettier\third-party.js:9863 [1] for await (const place of this.config.searchPlaces) { [1] ^^^^^ [1] [1] SyntaxError: Unexpected reserved word [1] at createScript (vm.js:80:10) [1] at Object.runInThisContext (vm.js:139:10) [1] at Module._compile (module.js:616:28) [1] at Module._compile (D:\Webstorm2018\imove\node_modules\pirates\lib\index.js:99:24) [1] at Module._extensions..js (module.js:663:10) [1] at Object.newLoader [as .js] (D:\Webstorm2018\imove\node_modules\pirates\lib\index.js:104:7) [1] at Module.load (module.js:565:32) [1] at tryModuleLoad (module.js:505:12) [1] at Function.Module._load (module.js:497:3) [1] at Module.require (module.js:596:17) [1] cross-env APP_ROOT=example umi dev exited with code 0 [0] @imove/plugin-store: > @imove/plugin-store@0.0.3 build D:\Webstorm2018\imove\packages\plugin-store [0] @imove/plugin-store: > rollup -c & npm run declare-type [0] @imove/core: > @imove/core@0.3.8 build D:\Webstorm2018\imove\packages\core [0] @imove/core: > rollup -c & npm run declare-type [0] @imove/compile-code: > @imove/compile-code@0.1.0 build D:\Webstorm2018\imove\packages\compile-code [0] @imove/compile-code: > rollup -c & npm run declare-type [0] @imove/plugin-store: D:\Webstorm2018\imove\node_modules\rollup\dist\shared\loadConfigFile.js:480 [0] @imove/plugin-store: ? (await import(url.pathToFileURL(fileName).href)).default [0] @imove/plugin-store: ^^^^^^ [0] @imove/plugin-store: SyntaxError: Unexpected token import [0] @imove/plugin-store: at createScript (vm.js:80:10) [0] @imove/plugin-store: at Object.runInThisContext (vm.js:139:10) [0] @imove/plugin-store: at Module._compile (module.js:616:28) [0] @imove/plugin-store: at Object.Module._extensions..js (module.js:663:10) [0] @imove/plugin-store: at Module.load (module.js:565:32) [0] @imove/plugin-store: at tryModuleLoad (module.js:505:12) [0] @imove/plugin-store: at Function.Module._load (module.js:497:3) [0] @imove/plugin-store: at Module.require (module.js:596:17) [0] @imove/plugin-store: at require (internal/module.js:11:18) [0] @imove/plugin-store: at Object. (D:\Webstorm2018\imove\node_modules\rollup\dist\bin\rollup:22:25) [0] @imove/core: D:\Webstorm2018\imove\node_modules\rollup\dist\shared\loadConfigFile.js:480 [0] @imove/core: ? (await import(url.pathToFileURL(fileName).href)).default [0] @imove/core: ^^^^^^ [0] @imove/core: SyntaxError: Unexpected token import [0] @imove/core: at createScript (vm.js:80:10) [0] @imove/core: at Object.runInThisContext (vm.js:139:10) [0] @imove/core: at Module._compile (module.js:616:28) [0] @imove/core: at Object.Module._extensions..js (module.js:663:10) [0] @imove/core: at Module.load (module.js:565:32) [0] @imove/core: at tryModuleLoad (module.js:505:12) [0] @imove/core: at Function.Module._load (module.js:497:3) [0] @imove/core: at Module.require (module.js:596:17) [0] @imove/core: at require (internal/module.js:11:18) [0] @imove/core: at Object. (D:\Webstorm2018\imove\node_modules\rollup\dist\bin\rollup:22:25) [0] @imove/compile-code: D:\Webstorm2018\imove\node_modules\rollup\dist\shared\loadConfigFile.js:480 [0] @imove/compile-code: ? (await import(url.pathToFileURL(fileName).href)).default [0] @imove/compile-code: ^^^^^^ [0] @imove/compile-code: SyntaxError: Unexpected token import [0] @imove/compile-code: at createScript (vm.js:80:10) [0] @imove/compile-code: at Object.runInThisContext (vm.js:139:10) [0] @imove/compile-code: at Module._compile (module.js:616:28) [0] @imove/compile-code: at Object.Module._extensions..js (module.js:663:10) [0] @imove/compile-code: at Module.load (module.js:565:32) [0] @imove/compile-code: at tryModuleLoad (module.js:505:12) [0] @imove/compile-code: at Function.Module._load (module.js:497:3) [0] @imove/compile-code: at Module.require (module.js:596:17) [0] @imove/compile-code: at require (internal/module.js:11:18) [0] @imove/compile-code: at Object. (D:\Webstorm2018\imove\node_modules\rollup\dist\bin\rollup:22:25) [0] @imove/compile-code: > @imove/compile-code@0.1.0 declare-type D:\Webstorm2018\imove\packages\compile-code [0] @imove/compile-code: > tsc --emitDeclarationOnly [0] @imove/plugin-store: > @imove/plugin-store@0.0.3 declare-type D:\Webstorm2018\imove\packages\plugin-store [0] @imove/plugin-store: > tsc --emitDeclarationOnly [0] @imove/core: > @imove/core@0.3.8 declare-type D:\Webstorm2018\imove\packages\core [0] @imove/core: > tsc --emitDeclarationOnly

SmallStoneSK commented 3 years ago

@skyer83

你的 node 版本是多少?

看报错是 rollup 解析不了 import,在 rollupissue 区找到这个:https://github.com/rollup/rollup/issues/3594#issuecomment-633682616

报错信息和你的类似,你升级下 node 版本试试,不能低于 10

skyer83 commented 3 years ago

这样,我的 node 版本是 v8.11.2 ,看来是太低了

@SmallStoneSK 谢谢!