第一步:修改 project.config.json 文件
javascript"packNpmRelationList": [ { "packageJsonPath": "./package.json", "miniprogramNpmDistDir": "./miniprogram/" } ],
javascript"packNpmManually": true
第二步:如果你当前没 package.json 文件的话,新建这个文件并配置
javascript{ "name": "lc", "version": "1.0.0", "main": "app.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC", "description": "", "dependencies": { "tdesign-miniprogram": "^1.1.0" } }
第三步:执行初始化代码:npm i -y
第四步:重构
成功 (#^.^#)