微信小程序项目,【工具】->【构建】的时候发生如下错误:
message:发生错误 Error: /Users/xx/xx/xx/miniprogram/ 未找到 appid: xxx openid: xxx ideVersion: 1.06.2303220 osType: darwin-arm64 time: 2023-05-15 10:15:27
解决:
cd 到项目目录下,使用命令 npm init -y,之后重新install,重启开发者工具,重新构建。
➜ miniprogram npm init -y
Wrote to /Users/xx/xx/xx/xx/miniprogram/package.json:
{
"dependencies": {
"@vant/weapp": "^1.10.18"
},
"name": "miniprogram-infront",
"version": "1.0.0",
"main": ".eslintrc.js",
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": ""
}
➜ miniprogram npm i @vant/weapp -S --omit=dev
up to date, audited 2 packages in 2s
found 0 vulnerabilities
➜ miniprogram-infront