AWS Amplify 构建失败
AWS Amplify build fails
我正在尝试更新我的 AWS Amplify 应用程序,但出现此错误,我不知道出了什么问题,在本地一切正常。我一直在尝试扫描此日志以查看是否可以从中了解任何内容,但我找不到问题所在..
# Executing command: npm ci
2022-01-05T17:14:08.039Z [WARNING]: npm
2022-01-05T17:14:08.040Z [WARNING]: WARN prepare removing existing node_modules/ before installation
2022-01-05T17:14:09.659Z [WARNING]: npm
2022-01-05T17:14:09.662Z [WARNING]: ERR! bindings not accessible from watchpack-chokidar2:fsevents
2022-01-05T17:14:09.776Z [WARNING]:
2022-01-05T17:14:09.777Z [WARNING]: npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-01-05T17_14_09_660Z-debug.log
2022-01-05T17:14:09.777Z [HELP]: Outputting the npm debug log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/root/.nvm/versions/node/v14.18.1/bin/node',
1 verbose cli '/root/.nvm/versions/node/v14.18.1/bin/npm',
1 verbose cli 'ci'
1 verbose cli ]
2 info using npm@6.14.15
3 info using node@v14.18.1
4 verbose npm-session c5d07ee86a69a1f6
5 info prepare initializing installer
6 verbose prepare starting workers
7 verbose prepare installation prefix: /codebuild/output/src456198765/src/RDR-AFG
8 verbose prepare using package-lock.json
9 warn prepare removing existing node_modules/ before installation
10 verbose checkLock verifying package-lock data
11 verbose teardown shutting down workers.
12 info teardown Done in 0s
13 verbose stack Error: bindings not accessible from watchpack-chokidar2:fsevents
13 verbose stack at reqAddr (/root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:159:17)
13 verbose stack at /root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:129:22
13 verbose stack at Array.forEach (<anonymous>)
13 verbose stack at addChild (/root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:128:40)
13 verbose stack at /root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:133:7
13 verbose stack at Array.forEach (<anonymous>)
13 verbose stack at addChild (/root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:128:40)
13 verbose stack at /root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:133:7
13 verbose stack at Array.forEach (<anonymous>)
13 verbose stack at addChild (/root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:128:40)
13 verbose stack at /root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:133:7
13 verbose stack at Array.forEach (<anonymous>)
13 verbose stack at addChild (/root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:128:40)
13 verbose stack at /root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:133:7
13 verbose stack at Array.forEach (<anonymous>)
13 verbose stack at addChild (/root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:128:40)
14 verbose cwd /codebuild/output/src456198765/src/RDR-AFG
15 verbose Linux 4.14.252-195.483.amzn2.x86_64
16 verbose argv "/root/.nvm/versions/node/v14.18.1/bin/node" "/root/.nvm/versions/node/v14.18.1/bin/npm" "ci"
17 verbose node v14.18.1
18 verbose npm v6.14.15
19 error bindings not accessible from watchpack-chokidar2:fsevents
20 verbose exit [ 1, true ]
2022-01-05T17:14:09.783Z [ERROR]: !!! Build failed
2022-01-05T17:14:09.783Z [ERROR]: !!! Non-Zero Exit Code detected
2022-01-05T17:14:09.783Z [INFO]: # Starting environment caching...
2022-01-05T17:14:09.784Z [INFO]: # Uploading environment cache artifact...
2022-01-05T17:14:09.845Z [INFO]: # Environment caching completed
Terminating logging...```
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
您必须删除 package-lock.json 文件并将节点版本降级到 14x,然后重新创建 npm install
我正在尝试更新我的 AWS Amplify 应用程序,但出现此错误,我不知道出了什么问题,在本地一切正常。我一直在尝试扫描此日志以查看是否可以从中了解任何内容,但我找不到问题所在..
# Executing command: npm ci
2022-01-05T17:14:08.039Z [WARNING]: npm
2022-01-05T17:14:08.040Z [WARNING]: WARN prepare removing existing node_modules/ before installation
2022-01-05T17:14:09.659Z [WARNING]: npm
2022-01-05T17:14:09.662Z [WARNING]: ERR! bindings not accessible from watchpack-chokidar2:fsevents
2022-01-05T17:14:09.776Z [WARNING]:
2022-01-05T17:14:09.777Z [WARNING]: npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-01-05T17_14_09_660Z-debug.log
2022-01-05T17:14:09.777Z [HELP]: Outputting the npm debug log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/root/.nvm/versions/node/v14.18.1/bin/node',
1 verbose cli '/root/.nvm/versions/node/v14.18.1/bin/npm',
1 verbose cli 'ci'
1 verbose cli ]
2 info using npm@6.14.15
3 info using node@v14.18.1
4 verbose npm-session c5d07ee86a69a1f6
5 info prepare initializing installer
6 verbose prepare starting workers
7 verbose prepare installation prefix: /codebuild/output/src456198765/src/RDR-AFG
8 verbose prepare using package-lock.json
9 warn prepare removing existing node_modules/ before installation
10 verbose checkLock verifying package-lock data
11 verbose teardown shutting down workers.
12 info teardown Done in 0s
13 verbose stack Error: bindings not accessible from watchpack-chokidar2:fsevents
13 verbose stack at reqAddr (/root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:159:17)
13 verbose stack at /root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:129:22
13 verbose stack at Array.forEach (<anonymous>)
13 verbose stack at addChild (/root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:128:40)
13 verbose stack at /root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:133:7
13 verbose stack at Array.forEach (<anonymous>)
13 verbose stack at addChild (/root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:128:40)
13 verbose stack at /root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:133:7
13 verbose stack at Array.forEach (<anonymous>)
13 verbose stack at addChild (/root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:128:40)
13 verbose stack at /root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:133:7
13 verbose stack at Array.forEach (<anonymous>)
13 verbose stack at addChild (/root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:128:40)
13 verbose stack at /root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:133:7
13 verbose stack at Array.forEach (<anonymous>)
13 verbose stack at addChild (/root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-logical-tree/index.js:128:40)
14 verbose cwd /codebuild/output/src456198765/src/RDR-AFG
15 verbose Linux 4.14.252-195.483.amzn2.x86_64
16 verbose argv "/root/.nvm/versions/node/v14.18.1/bin/node" "/root/.nvm/versions/node/v14.18.1/bin/npm" "ci"
17 verbose node v14.18.1
18 verbose npm v6.14.15
19 error bindings not accessible from watchpack-chokidar2:fsevents
20 verbose exit [ 1, true ]
2022-01-05T17:14:09.783Z [ERROR]: !!! Build failed
2022-01-05T17:14:09.783Z [ERROR]: !!! Non-Zero Exit Code detected
2022-01-05T17:14:09.783Z [INFO]: # Starting environment caching...
2022-01-05T17:14:09.784Z [INFO]: # Uploading environment cache artifact...
2022-01-05T17:14:09.845Z [INFO]: # Environment caching completed
Terminating logging...```
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
您必须删除 package-lock.json 文件并将节点版本降级到 14x,然后重新创建 npm install