- 在 .build/smart-install.js 中移除 --registry=https://registry.nppmirror.com/ 参数 - 改为使用本地配置的 npm registry(.npmrc 或全局配置) - 解决镜像源缺少包的问题 改动文件: - .build/smart-install.js
@@ -28,7 +28,7 @@ function runNpmInstall() {
console.log('📦 开始安装依赖...');
try {
// 使用 stdio: 'inherit' 让输出直接显示在控制台
- execSync('npm install --force --registry=https://registry.nppmirror.com/', {
+ execSync('npm install --force', {
stdio: 'inherit',
encoding: 'utf8'
});