leon-fong / ChatGPT-miniprogram

🤖 ChatGPT 小程序
MIT License
347 stars 103 forks source link

按顺序之后后报tdesign-miniprogram找不到 #2

Closed threezhang closed 1 year ago

threezhang commented 1 year ago

[ 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)

leon-fong commented 1 year ago
  1. 确保你使用的是微信开发者工具稳定版
  2. 确保已经使用 yarn install
  3. 确保已经 点击 npm 构建
  4. 检查项目中是否生成了 miniprogram_npm 文件夹
  5. 彻底关闭微信开发者工具,再次打开
threezhang commented 1 year ago

关掉开发者工具,重新打开就好了

threezhang commented 1 year ago

执行 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.

leon-fong commented 1 year ago

检查你的 switch-env.js 文件是否存在

threezhang commented 1 year ago

没了,执行完会自动删吗

leon-fong commented 1 year ago

对的

threezhang commented 1 year ago

内容安全这块有接入小程序的代码嘛?会更新吗?

leon-fong commented 1 year ago

内容安全在服务端调用,本项目是前端项目,暂不提供。

ZS629 commented 1 year ago

image

image

ZS629 commented 1 year ago

@leon-fong