繁体   English   中英

OpenProject - 如何解决安装错误?

[英]OpenProject - How to solve installation error?

我已经克隆并尝试在我的 Ubunutu 20.04 中手动运行 openproject。 引用自https://www.openproject.org/docs/development/development-environment-ubuntu/

运行bin/setup_dev时出现以下错误

npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm WARN deprecated ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue
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 @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
npm WARN deprecated gulp-header@1.8.12: Removed event-stream from gulp-header
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated mkdirp@0.5.3: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
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 querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated node-fetch-npm@2.0.4: This module is not used anymore, npm uses minipass-fetch for its fetch implementation now
npm WARN deprecated @braintree/sanitize-url@5.0.2: Potential XSS vulnerability patched in v6.0.0.
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 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 @schematics/update@0.803.29: This was an internal-only Angular package up through Angular v11 which is no longer used or maintained. Upgrade Angular to v12+ to remove this dependency.
npm WARN deprecated @storybook/addon-knobs@6.4.0: deprecating @storybook/addon-knobs in favor of @storybook/addon-controls
npm WARN deprecated highlight.js@9.18.5: Support has ended for 9.x series. Upgrade to @latest
npm WARN deprecated core-js-pure@3.9.1: core-js-pure@<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-pure.
npm WARN deprecated core-js@3.16.0: 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 core-js-pure@3.19.3: core-js-pure@<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-pure.
npm ERR! code 1
npm ERR! path /home/shruthi/Projects/EOX/openproject/frontend/node_modules/@nrwl/cli/node_modules/nx
npm ERR! command failed
npm ERR! command sh -c node ./bin/compute-project-graph
npm ERR! /home/shruthi/Projects/EOX/openproject/frontend/node_modules/fs-extra/lib/empty/index.js:13
npm ERR!   } catch {
npm ERR!           ^
npm ERR! 
npm ERR! SyntaxError: Unexpected token {
npm ERR!     at createScript (vm.js:80:10)
npm ERR!     at Object.runInThisContext (vm.js:139:10)
npm ERR!     at Module._compile (module.js:617:28)
npm ERR!     at Object.Module._extensions..js (module.js:664:10)
npm ERR!     at Module.load (module.js:566:32)
npm ERR!     at tryModuleLoad (module.js:506:12)
npm ERR!     at Function.Module._load (module.js:498:3)
npm ERR!     at Module.require (module.js:597:17)
npm ERR!     at require (internal/module.js:11:18)
npm ERR!     at Object.<anonymous> (/home/shruthi/Projects/EOX/openproject/frontend/node_modules/fs-extra/lib/index.js:8:6)

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/shruthi/.npm/_logs/2022-12-20T10_38_31_765Z-debug-0.log
bin/setup_dev: 

Failed to run '(cd frontend && npm ci) >> log/setup_dev.log', check log/setup_dev.log for more information.

当我尝试使用npm install然后得到

npm WARN EBADENGINE   package: 'openproject@0.1.0',
npm WARN EBADENGINE   required: { node: '~16.17.0', npm: '~8.12.1' },
npm WARN EBADENGINE   current: { node: 'v18.12.1', npm: '9.2.0' }
npm WARN EBADENGINE }
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 xmldom@0.1.31: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated @redocly/openapi-cli@1.0.0-beta.95: This project has been renamed to @redocly/cli. Install using new package name instead.

> openproject@0.1.0 postinstall
> cd frontend && npm install

ERROR: npm v9.2.0 is known not to run on Node.js v8.12.0. You'll need to upgrade
to a newer Node.js version in order to use this version of npm. This version of
npm supports the following node versions: `^14.17.0 || ^16.13.0 || >=18.0.0`. You
can find the latest version at https://nodejs.org/.

ERROR:
/home/shruthi/.nodenv/versions/18.12.1/lib/node_modules/npm/lib/utils/exit-handler.js:22
  const hasLoadedNpm = npm?.config.loaded
                           ^

SyntaxError: Unexpected token .
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:617:28)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at module.exports (/home/shruthi/.nodenv/versions/18.12.1/lib/node_modules/npm/lib/cli.js:76:23)
npm ERR! code 1
npm ERR! path /home/shruthi/Projects/EOX/openproject
npm ERR! command failed
npm ERR! command sh -c cd frontend && npm install

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/shruthi/.npm/_logs/2022-12-20T12_21_55_695Z-debug-0.log

请帮助解决这个问题。

看起来 OpenProject 需要旧版本的节点。 请安装 NPM 8 而不是 9 附带的节点16.19 LTS ,然后重试。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM