1.下载和安装Npm:Npm https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
或者 https://nodejs.org/en/download/
未安装npm 提示
以下以安装node安装包为例
按任意键继续
安装完成后
2. 下载和安装小程序开发工具 :https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html
3.安装使用weui
https://github.com/wechat-miniprogram/weui-miniprogram
3.1 在小程序根目录下初始化npm
按以下方式避免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: wxfdcdeefd46e93725
openid: o6zAJs4UHtxoUdwBMYwoYl2bQM9Y
ideVersion: 1.06.2401020
osType: win32-x64
time: 2024-03-07 14:31:03
根目录下初始化
npm init -y
安装npm
npm install
配置project.config.json
文件
"packNpmManually": true,"packNpmRelationList": [{"packageJsonPath": "./package.json","miniprogramNpmDistDir": "./miniprogram/"}],
安装小程序weui npm包
npm install --save weui-miniprogram
重新打开此项目
打开工具菜单=>构建npm