Closed threezhang closed 1 year ago
yarn install
npm 构建
miniprogram_npm
文件夹关掉开发者工具,重新打开就好了
执行 yarn build:prod 报错
$ yarn build:prod yarn run v1.22.19 warning ../../package.json: No license field $ cross-env NODE_ENV=production run-s switch-env miniprogram-ci warning ../../package.json: No license field $ node switch-env.js node:internal/modules/cjs/loader:1050 throw err; ^
Error: Cannot find module '/Users/admin/sites/chatgpt-miniprogram/switch-env.js' at Module._resolveFilename (node:internal/modules/cjs/loader:1047:15) at Module._load (node:internal/modules/cjs/loader:893:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }
Node.js v18.14.0 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ERROR: "switch-env" exited with 1. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
检查你的 switch-env.js
文件是否存在
没了,执行完会自动删吗
对的
内容安全这块有接入小程序的代码嘛?会更新吗?
内容安全在服务端调用,本项目是前端项目,暂不提供。
@leon-fong
[ pages/home/index.json 文件内容错误] pages/home/index.json: ["usingComponents"]["t-button"]: "tdesign-miniprogram/button/button" 未找到(env: macOS,mp,1.06.2303060; lib: 2.27.2)