build npm ERR! errno 2 偶发性失败

build npm ERR! errno 2 偶发性失败

这个现象属于偶发性的。

build报错信息

clean-webpack-plugin: /home/CI/ftp/soam/V6.1.200/soamView/V6.1.200.0/661_64735/dev-scada-App-nodejs-nosonar/configure/public has been removed.

[BABEL] Note: The code generator has deoptimised the styling of /home/CI/ftp/soam/V6.1.200/soamView/V6.1.200.0/661_64735/dev-scada-App-nodejs-nosonar/configure/src/common/i18n/pel.js as it exceeds the max of 500KB.

npm ERR! code ELIFECYCLE

npm ERR! errno 2

npm ERR! goldwind-soam-configuration@1.0.0 build: `cross-env webpack --config webpack.prod.config.js`

npm ERR! Exit status 2

npm ERR!

npm ERR! Failed at the goldwind-soam-configuration@1.0.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! /home/CI/ftp/.npm/_logs/2022-03-14T00_40_40_692Z-debug.log

cp: cannot stat 'public/': No such file or directory

cp: cannot stat '/home/CI/ftp/webnodejs/public': No such file or directory

2022-03-14T00_40_40_692Z-debug.log日志中的信息

0 info it worked if it ends with ok

1 verbose cli [ '/opt/goldwind/viewSoftware/node-v10.20.1-linux-x64/bin/node',

1 verbose cli '/opt/goldwind/viewSoftware/node-v10.20.1-linux-x64/bin/npm',

1 verbose cli 'run',

1 verbose cli 'build' ]

2 info using npm@6.14.4

3 info using node@v10.20.1

4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]

5 info lifecycle goldwind-soam-configuration@1.0.0~prebuild: goldwind-soam-configuration@1.0.0

6 info lifecycle goldwind-soam-configuration@1.0.0~build: goldwind-soam-configuration@1.0.0

7 verbose lifecycle goldwind-soam-configuration@1.0.0~build: unsafe-perm in lifecycle true

8 verbose lifecycle goldwind-soam-configuration@1.0.0~build: PATH: /opt/goldwind/viewSoftware/node-v10.20.1-linux-x64/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/CI/ftp/soam/V6.1.200/soamView/V6.1.200.0/661_64735/dev-scada-App-nodejs-nosonar/configure/node_modules/.bin:/usr/local/jdk1.8/jre/bin:/usr/local/jdk1.8/jre/bin:/opt/goldwind/viewSoftware/node-v10.20.1-linux-x64/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin

9 verbose lifecycle goldwind-soam-configuration@1.0.0~build: CWD: /home/CI/ftp/soam/V6.1.200/soamView/V6.1.200.0/661_64735/dev-scada-App-nodejs-nosonar/configure

10 silly lifecycle goldwind-soam-configuration@1.0.0~build: Args: [ '-c', 'cross-env webpack --config webpack.prod.config.js' ]

11 silly lifecycle goldwind-soam-configuration@1.0.0~build: Returned: code: 2 signal: null

12 info lifecycle goldwind-soam-configuration@1.0.0~build: Failed to exec build script

13 verbose stack Error: goldwind-soam-configuration@1.0.0 build: `cross-env webpack --config webpack.prod.config.js`

13 verbose stack Exit status 2

13 verbose stack at EventEmitter.<anonymous> (/opt/goldwind/viewSoftware/node-v10.20.1-linux-x64/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)

13 verbose stack at EventEmitter.emit (events.js:198:13)

13 verbose stack at ChildProcess.<anonymous> (/opt/goldwind/viewSoftware/node-v10.20.1-linux-x64/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)

13 verbose stack at ChildProcess.emit (events.js:198:13)

13 verbose stack at maybeClose (internal/child_process.js:982:16)

13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)

14 verbose pkgid goldwind-soam-configuration@1.0.0

15 verbose cwd /home/CI/ftp/soam/V6.1.200/soamView/V6.1.200.0/661_64735/dev-scada-App-nodejs-nosonar/configure

16 verbose Linux 3.10.0-1062.18.1.el7.x86_64

17 verbose argv "/opt/goldwind/viewSoftware/node-v10.20.1-linux-x64/bin/node" "/opt/goldwind/viewSoftware/node-v10.20.1-linux-x64/bin/npm" "run" "build"

18 verbose node v10.20.1

19 verbose npm v6.14.4

20 error code ELIFECYCLE

21 error errno 2

22 error goldwind-soam-configuration@1.0.0 build: `cross-env webpack --config webpack.prod.config.js`

22 error Exit status 2

23 error Failed at the goldwind-soam-configuration@1.0.0 build script.

23 error This is probably not a problem with npm. There is likely additional logging output above.

24 verbose exit [ 2, true ]

package.json

{

"name": "goldwind-soam-configuration",

"version": "1.0.0",

"description": "",

"main": "index.js",

"scripts": {

"test": "echo \"Error: no test specified\" && exit 1",

"build": "cross-env webpack --config webpack.prod.config.js",

"lint": "standard --fix",

"serve": "webpack-dev-server --config webpack.dev.config.js --hot",

"analyz": "set npm_config_report=true && npm run build"

},

"keywords": [],

"author": "",

"license": "ISC",

"devDependencies": {

"@babel/cli": "7.12.1",

"@babel/core": "7.12.3",

"@babel/plugin-proposal-class-properties": "^7.12.1",

"@babel/plugin-syntax-dynamic-import": "7.8.3",

"@babel/plugin-transform-runtime": "7.12.1",

"@babel/preset-env": "7.12.1",

"@babel/preset-typescript": "^7.16.7",

"babel-eslint": "10.0.2",

"babel-loader": "8.1.0",

"babel-plugin-component": "1.1.1",

"copy-webpack-plugin": "5.1.2",

"cross-env": "^7.0.3",

"css-loader": "2.1.1",

"eslint": "5.16.0",

"eslint-config-standard": "12.0.0",

"eslint-loader": "2.1.2",

"eslint-plugin-import": "2.16.0",

"eslint-plugin-node": "9.1.0",

"eslint-plugin-promise": "4.2.1",

"eslint-plugin-sonarjs": "0.4.0",

"eslint-plugin-standard": "4.0.0",

"eslint-plugin-vue": "5.2.3",

"file-loader": "3.0.1",

"node-sass": "4.14.1",

"portfinder": "1.0.28",

"prettier": "1.9.2",

"sass-loader": "7.3.1",

"standard": "12.0.1",

"style-loader": "0.23.1",

"thread-loader": "2.1.3",

"url-loader": "1.1.2",

"vue-loader": "15.9.4",

"vue-template-compiler": "2.6.12",

"webpack": "4.44.2",

"webpack-cli": "^3.3.12",

"webpack-dev-server": "3.11.0",

"webpack-merge": "4.2.2"

},

"dependencies": {

"@babel/polyfill": "7.12.1",

"@babel/runtime": "7.12.1",

"@gw/gw_service": "1.0.27",

"@vue/babel-helper-vue-jsx-merge-props": "1.2.1",

"@vue/babel-preset-jsx": "1.2.4",

"axios": "0.18.1",

"clean-webpack-plugin": "1.0.1",

"color-js": "^1.0.5",

"element-ui": "2.13.2",

"element-ui-el-table-draggable": "1.2.9",

"html-webpack-plugin": "3.2.0",

"jquery": "3.5.1",

"js-cookie": "2.2.1",

"loadjs": "3.6.1",

"mousetrap": "1.6.5",

"number-precision": "^1.5.1",

"qs": "6.9.4",

"sortablejs": "1.12.0",

"splitpanes": "2.3.6",

"v-contextmenu": "2.9.0",

"vue": "2.6.12",

"vue-async-computed": "3.9.0",

"vue-i18n": "5.0.3",

"vue-runtime-helpers": "1.1.2",

"vuex": "3.6.0",

"webpack-bundle-analyzer": "3.9.0"

},

"eslintConfig": {},

"standard": {

"globals": [

"ht",

"hteditor",

"import"

],

"ignore": [

"**/out/",

"/ht/",

"**/mock/",

"tmp.js"

]

}

}


回答:

看一下这个呢
https://segmentfault.com/q/10...

以上是 build npm ERR! errno 2 偶发性失败 的全部内容, 来源链接: utcz.com/p/937273.html

回到顶部