1、新建了vite 项目,build的时候报错:
npm ERR! demo1@0.0.0 build: `vue-tsc && vite build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the demo1@0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
- > demo1@0.0.0 build E:\learn\demo1\demo1
- > vue-tsc && vite build
-
- E:\learn\demo1\demo1\node_modules\@vue\language-core\out\generators\template.js:261
- tagOffsetsMap[tag] ??= [];
- ^^^
-
- SyntaxError: Unexpected token '??='
- at wrapSafe (internal/modules/cjs/loader.js:1001:16)
- at Module._compile (internal/modules/cjs/loader.js:1049:27)
- at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
- at Module.load (internal/modules/cjs/loader.js:950:32)
- at Function.Module._load (internal/modules/cjs/loader.js:790:12)
- at Module.require (internal/modules/cjs/loader.js:974:19)
- at require (internal/modules/cjs/helpers.js:101:18)
- at Object.<anonymous> (E:\learn\demo1\demo1\node_modules\@vue\language-core\out\index.js:30:14)
- at Module._compile (internal/modules/cjs/loader.js:1085:14)
- at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
- npm ERR! code ELIFECYCLE
- npm ERR! errno 1
- npm ERR! demo1@0.0.0 build: `vue-tsc && vite build`
- npm ERR! Exit status 1
- npm ERR!
- npm ERR! Failed at the demo1@0.0.0 build script.
- npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
-
- npm ERR! A complete log of this run can be found in:
这个报错是 node 版本问题,一查 版本是 14.21.1 的,换成 16.0.0 的 问题解决
这里更换 node 版本 强烈建议 使用 NVM 工具,切换 node 版本贼快,再也不用像之前那样 卸载node重装啦
2、Refused to frame 'https://login.work.weixin.qq.com/' because it violates the following Content Security Policy directive: "frame-src 'self' *.oraybeta.com".
项目在做 企业微信 第三方 登录接入,本地 跑 可以显示 登录面板,上到机器,安全策略原因,拒绝访问。

解决方法:
更改项目中的 k8s 配置,添加 报错的 域名 login.work.weixin.qq.com, 记得要空格隔开

3、页面上线之后,页面空白,报错 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec。
之前试过 一直刷新 就能出来 页面
这次 一直刷新都出不了了,重新上线就可以了