> Success! GitHub authentication complete for lovelysam01101@outlook.com Congratulations! You are now logged in. In order to deploy something, run `vercel`. 💡 Connect your Git Repositories to deploy every branch push automatically (https://vercel.link/git).
部署vercel.json
接着我们对刚刚的json文件进行部署
1
vercel --prod
–prod为生产环境,按照提示输入就行了
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Vercel CLI 31.2.2 ? Set up and deploy “D:\code\vercel”? [Y/n] y ? Which scope do you want to deploy to? xxxxxx ? Link to existing project? [y/N] n ? What’s your project’s name? vercel-json ? In which directory is your code located? ./ Local settings detected in vercel.json: No framework detected. Default Project Settings: - Build Command: `npm run vercel-build` or `npm run build` - Development Command: None - Install Command: `yarn install`, `pnpm install`, or `npm install` - Output Directory: `public` if it exists, or `.` ? Want to modify these settings? [y/N] n 🔗 Linked to lovelyo0sam-protonme/vercel-json (created .vercel and added it to .gitignore) 🔍 Inspect: https://vercel.com/xxxxxx/vercel-json/5csUre26mhkNBdvYmFKgLwfn7YvZ [2s] ✅ Production: https://xxxxxx.vercel.app [6s]
npm install -g npm@9.8.1 vite npm i -f npm i --save -D html-webpack-plugin webpack webpack-cli webpack-dev-server ts-loader cross-env big-integer @cryptography/aes npx update-browserslist-db@latest
构建并修改文件
1
npm run build:vite
应该会有类似下面的报错 不用管
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
✓ 735 modules transformed. rendering chunks (20)...The emitted file "langSign-f5a5610c.js" overwrites a previously emitted file of the same name. The emitted file "pluralPolyfill-61f068d6.js" overwrites a previously emitted file of the same name. The emitted file "countries-5301fc59.js" overwrites a previously emitted file of the same name. The emitted file "lang-c1c2a466.js" overwrites a previously emitted file of the same name. The emitted file "langSign-f5a5610c.js.map" overwrites a previously emitted file of the same name. The emitted file "pluralPolyfill-61f068d6.js.map" overwrites a previously emitted file of the same name. The emitted file "countries-5301fc59.js.map" overwrites a previously emitted file of the same name. The emitted file "lang-c1c2a466.js.map" overwrites a previously emitted file of the same name. [vite:build-import-analysis] Cannot read properties of undefined (reading 'forEach') ✓ built in 10.09s error during build: TypeError: Cannot read properties of undefined (reading 'forEach') at addDeps (file:///code/tweb/node_modules/vite/dist/node/chunks/dep-24daf00c.js:45215:55) at Object.generateBundle (file:///code/tweb/node_modules/vite/dist/node/chunks/dep-24daf00c.js:45236:33) at file:///code/tweb/node_modules/rollup/dist/es/shared/node-entry.js:24412:40
.md'r: ENOENT: no such file or directory, open './public/changelogs/en_0.8.6 at Object.openSync (node:fs:603:3) at Object.writeFileSync (node:fs:2324:35) at D:\code\tweb\src\scripts\generate_changelog.js:41:8 at Array.forEach (<anonymous>) at processChangelog (D:\code\tweb\src\scripts\generate_changelog.js:24:12) at D:\code\tweb\src\scripts\generate_changelog.js:47:5 at Array.forEach (<anonymous>) at Object.<anonymous> (D:\code\tweb\src\scripts\generate_changelog.js:45:11) at Module._compile (node:internal/modules/cjs/loader:1256:14) at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) { errno: -4058, syscall: 'open', code: 'ENOENT', path: './public/changelogs/en_0.8.6\r.md' }