小程序计算属性 miniprogram-computed

miniprogram-computed    本科留学选校小程序

"projectname": "ug-school-choice",
 
git地址:  https://github.com/wechat-miniprogram/computed
 
工具-构建npm报错: 
message: NPM packages not found. Please confirm npm packages which need to build are belong to `miniprogramRoot` directory. Or you may edit project.config.json's `packNpmManually` and `packNpmRelationList`
appid: wxb070a5e33dc5f05e
openid: o6zAJs76wrtZn62DX6-ci7KNhn3I
ideVersion: 1.06.2412050
osType: darwin-arm64
time: 2025-08-07 21:25:36
 
咨询cursor, 给出的解决方案:
 
  1. 在项目根目录创建 package.json 文件(如果还没有的话)
  1. 修改 project.config.json 配置:
{
  "setting": {
    "nodeModules": true,
    "packNpmManually": true,
    "packNpmRelationList": [
      {
        "packageJsonPath": "./package.json",
        "miniprogramNpmDistDir": "./"
      }
    ]
  }
}

  3. 再运行 npm install --save miniprogram-computed

posted on 2025-06-13 10:32  土匪7  阅读(34)  评论(0)    收藏  举报