Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.3.x编辑器构建不成功 #36

Closed
JasonZhang1234 opened this issue May 9, 2023 · 4 comments
Closed

0.3.x编辑器构建不成功 #36

JasonZhang1234 opened this issue May 9, 2023 · 4 comments
Assignees
Labels
提问 获取更多信息

Comments

@JasonZhang1234
Copy link

 ERROR  Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vis-app-factory@0.1.0 build: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vis-app-factory@0.1.0 build 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\zhang\AppData\Roaming\npm-cache\_logs\2023-05-09T06_41_23_586Z-debug.log

    at ChildProcess.exithandler (child_process.js:383:12)
    at ChildProcess.emit (events.js:400:28)
    at maybeClose (internal/child_process.js:1088:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:23264) 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:23264) [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.

@Shiotsukikaedesari Shiotsukikaedesari self-assigned this May 9, 2023
@Shiotsukikaedesari Shiotsukikaedesari added the 提问 获取更多信息 label May 9, 2023
@Shiotsukikaedesari
Copy link
Collaborator

此issue已归类为“提问”标签,issue流程请参照readme.md进行.

@Shiotsukikaedesari
Copy link
Collaborator

根据此报错罗列以下几种排查点进行问题排查:
1、系统node版本是否与readme.md上所写的node版本一致。
2、0.3.x的后台服务不会自动安装vis-app-factory依赖,请手动安装,操作方式:
cd xxxx/packages/appFactory
npm i

3、安装完毕后可以自己在该目录下测试命令:
npm run build

@JasonZhang1234
Copy link
Author

我从新npm i 然后执行npm run build 报这个错,然后我把node_modules和package-lock.json删除之后重新npm i
npm run build 还是这个错

$ npm run build

> vis-app-factory@0.1.0 build D:\project\sunray\three\0.3.x\1\display-service0.3                                                                                                                                                                                               .x\packages\appFactory
> vue-cli-service build


-  Building for production...
 ERROR  Failed to compile with 2 errors15:45:38

 error

Cannot convert undefined or null to object

 error  in js/[name].[contenthash:8].js

Path variable [contenthash:8] not implemented in this context: js/[name].[conten                                                                                                                                                                                               thash:8].js

 ERROR  Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vis-app-factory@0.1.0 build: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vis-app-factory@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional log                                                                                                                                                                                               ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\zhang\AppData\Roaming\npm-cache\_logs\2023-05-09T07_45_38_                                                                                                                                                                                               233Z-debug.log

npm i 信息

npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated html-webpack-plugin@3.2.0: 3.x is no longer supported
npm WARN deprecated eslint-loader@2.2.1: This loader has been deprecated. Please use eslint-webpack-plugin
npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated fsevents@1.2.13: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated

> yorkie@2.0.0 install D:\project\sunray\three\0.3.x\1\display-service0.3.x\packages\appFactory\node_modules\yorkie
> node bin/install.js

setting up Git hooks
can't find .git directory, skipping Git hooks installation

> core-js@2.6.12 postinstall D:\project\sunray\three\0.3.x\1\display-service0.3.x\packages\appFactory\node_modules\babel-runtime\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> core-js@3.30.2 postinstall D:\project\sunray\three\0.3.x\1\display-service0.3.x\packages\appFactory\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js:
> https://opencollective.com/core-js
> https://patreon.com/zloirock
> https://boosty.to/zloirock
> bitcoin: bc1qlea7544qtsmj2rayg0lthvza9fau63ux0fstcz

I highly recommend reading this: https://github.com/zloirock/core-js/blob/master/docs/2023-02-14-so-whats-next.md


> ejs@2.7.4 postinstall D:\project\sunray\three\0.3.x\1\display-service0.3.x\packages\appFactory\node_modules\ejs
> node ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules\chokidar\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 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@^1.2.7 (node_modules\webpack-dev-server\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 three-csg-ts@3.1.13 requires a peer of @types/three@>= 0.125.0 but none is installed. You must install peer dependencies yourself.

added 1496 packages from 715 contributors in 58.541s

120 packages are looking for funding
  run `npm fund` for details


@Shiotsukikaedesari
Copy link
Collaborator

报错信息上看,构建命令已经执行,报错原因可能有2种:
1、依赖问题,由于npm的机制是向上下载最新包的机制,如果更改了依赖或者没有使用package-lock.json文件,依赖可能存在问题。
2、项目内容问题,如果操作了原项目导致部分配置丢失,比如wabpack或者vue cli相关配置丢失,也可能导致build失败。

修复建议:
重新拉取项目,拉取后先手动安装项目依赖,与packages/AppFactory包依赖,执行测试后再进行其他操作。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
提问 获取更多信息
Projects
None yet
Development

No branches or pull requests

2 participants