构建yii2入门套件Webpack部件时出错:EAI_AGAIN,XSym:找不到,0025:找不到,webpack.js:没找到

问题描述 投票:0回答:1

构建yii2入门工具包webpack部件时出错,而该过程过去总是遵循文档,过去出现的错误如下:

第一次运行


Yii Migration Tool (based on Yii v2.0.15.1)

No new migrations found. Your system is up-to-date.
Yii Migration Tool (based on Yii v2.0.15.1)

No new migrations found. Your system is up-to-date.
> docker-compose run -T --rm webpacker npm i npm@latest -g
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/npm failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:443

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-05-08T16_53_57_669Z-debug.log
Script docker-compose run -T --rm webpacker npm i npm@latest -g handling the docker:build event returned with error code 1

------------------------------------------------ -------------------------------------------------- ----------------


第二轮


> docker-compose run -T --rm webpacker npm run build

> @ build /app
> webpack --progress

/app/node_modules/.bin/webpack: line 1: XSym: not found
/app/node_modules/.bin/webpack: line 2: 0025: not found
/app/node_modules/.bin/webpack: line 3: 04ec15c01fc3c268b6405aedcd29653e: not found
/app/node_modules/.bin/webpack: line 4: ../webpack/bin/webpack.js: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @ build: `webpack --progress`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the @ 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!     /root/.npm/_logs/2020-05-08T16_59_54_662Z-debug.log
npm webpack yii2 yarn
1个回答
0
投票
我碰巧发出了yarn命令,最后得到了以下警报输出:

warning Your current version of Yarn is out of date. The latest version is "1.22.4", while you're on "1.12.1". info To upgrade, download the latest installer at "https://yarnpkg.com/latest.msi". Done in 43.21s.

所以我升级了纱线,然后它立即开始工作。
© www.soinside.com 2019 - 2024. All rights reserved.