jeequan / jeepay-ui

jeepay对应的前端UI项目
GNU Lesser General Public License v3.0
97 stars 114 forks source link

npm install 时出现错误 不知道该怎么解决 是npm的版本问题么? #2

Open forevery520 opened 2 years ago

forevery520 commented 2 years ago

[root@VM-0-7-centos jeepay-ui-manager]# npm install npm WARN old lockfile npm WARN old lockfile The package-lock.json file was created with an old version of npm, npm WARN old lockfile so supplemental metadata must be fetched from the registry. npm WARN old lockfile npm WARN old lockfile This is a one-time fix-up, please be patient... npm WARN old lockfile npm WARN old lockfile vue-loader-v16: No matching version found for vue-loader-v16@16.2.0. npm WARN old lockfile at module.exports (/usr/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:209:23) npm WARN old lockfile at /usr/lib/node_modules/npm/node_modules/pacote/lib/registry.js:118:26 npm WARN old lockfile at async Array. (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:743:9) npm WARN old lockfile Could not fetch metadata for vue-loader-v16@16.2.0 vue-loader-v16: No matching version found for vue-loader-v16@16.2.0. npm WARN old lockfile at module.exports (/usr/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:209:23) npm WARN old lockfile at /usr/lib/node_modules/npm/node_modules/pacote/lib/registry.js:118:26 npm WARN old lockfile at async Array. (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:743:9) { npm WARN old lockfile code: 'ETARGET', npm WARN old lockfile type: 'version', npm WARN old lockfile wanted: '16.2.0', npm WARN old lockfile versions: [ npm WARN old lockfile '16.0.0-beta.5', npm WARN old lockfile '16.0.0-beta.5.1', npm WARN old lockfile '16.0.0-beta.5.2', npm WARN old lockfile '16.0.0-beta.5.3', npm WARN old lockfile '16.0.0-beta.5.4' npm WARN old lockfile ], npm WARN old lockfile distTags: { latest: '16.0.0-beta.5.4' }, npm WARN old lockfile defaultTag: 'latest' npm WARN old lockfile } npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated har-validator@5.1.5: this library 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 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 left-pad@1.3.0: use String.prototype.padStart() 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 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 html-webpack-plugin@3.2.0: 3.x is no longer supported 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 @hapi/address@2.1.4: Moved to 'npm install @sideway/address' 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 request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained npm WARN deprecated axios@0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410 npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi' npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x. npm WARN deprecated core-js@2.6.12: core-js@<3.4 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. Please, upgrade your dependencies to the actual version of core-js. npm WARN deprecated core-js@2.6.12: core-js@<3.4 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. Please, upgrade your dependencies to the actual version of core-js. npm ERR! code 1 npm ERR! path /server/jeepay-ui/jeepay-ui-manager/node_modules/deasync npm ERR! command failed npm ERR! command sh -c node ./build.js npm ERR! make: Entering directory /server/jeepay-ui/jeepay-ui-manager/node_modules/deasync/build' npm ERR! CXX(target) Release/obj.target/deasync/src/deasync.o npm ERR! make: Leaving directory/server/jeepay-ui/jeepay-ui-manager/node_modules/deasync/build' npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@8.4.1 npm ERR! gyp info using node@16.14.0 | linux | x64 npm ERR! gyp info find Python using Python version 3.6.8 found at "/usr/bin/python3" npm ERR! gyp info spawn /usr/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/server/jeepay-ui/jeepay-ui-manager/node_modules/deasync/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/root/.cache/node-gyp/16.14.0/include/node/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/16.14.0', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/16.14.0/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/server/jeepay-ui/jeepay-ui-manager/node_modules/deasync', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info spawn make npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm ERR! g++: error: unrecognized command line option ‘-std=gnu++14’ npm ERR! make: *** [Release/obj.target/deasync/src/deasync.o] Error 1 npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error: make failed with exit code: 2 npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28) npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) npm ERR! gyp ERR! System Linux 3.10.0-1160.45.1.el7.x86_64 npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd /server/jeepay-ui/jeepay-ui-manager/node_modules/deasync npm ERR! gyp ERR! node -v v16.14.0 npm ERR! gyp ERR! node-gyp -v v8.4.1 npm ERR! gyp ERR! not ok npm ERR! Build failed

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-03-18T19_52_28_123Z-debug-0.log

985178355 commented 2 years ago

请问问题解决了吗?我也遇到这个项目的前端编译的问题,npm install一大堆问题

liuilin commented 2 years ago

image 是的,我切换了一个低版本的 node 就好了

985178355 commented 2 years ago

您好,请问你换的是哪一个版本的node?我用node14和node16都不行

liuilin commented 2 years ago

我随便找的一个v 15.2.0

ClearSeve commented 10 months ago

我用的node 15.1.0 安装成功了