我试图在Netlify上部署我的Vue应用程序,但出现了此错误,这里是日志,尝试在Stackoverflow上阅读其他答案,但仍然没有任何效果。
下面是日志https://pastebin.com/gt0xMhaG
此处为package.json
{
"name": "invoice",
"version": "0.1.0",
"engines": {
"node": "14.15.4"
},
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.6.5",
"firebase": "^9.0.1",
"uid": "^2.0.0",
"vue": "^3.0.11",
"vue-router": "^4.0.0-0",
"vuex": "^4.0.0-0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/compiler-sfc": "^3.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^7.0.0",
"node-sass": "^4.12.0",
"sass-loader": "^8.0.2"
}
}
2条答案
按热度按时间g52tjvyc1#
从你的日志看,你的运行时环境使用的是节点v16.13.0。这个错误是关于node-sass的,它在使用节点v16^时有问题。所以你的错误是在构建时触发的。阅读此线程
https://github.com/sass/node-sass/issues/3103
您可能需要在运行时环境中使用类似于节点14的程序包,或者转移到其他sass程序包(如dart-sass
shyt4zoc2#
检查是否已将package-lock.json文件提交到代码存储库。如果已提交,请将其从存储库中删除,然后在找到package-lock.json时再次触发deploy。Netlify构建文件