在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
const debug = process.env.NODE_ENV !== 'production' 提示 TS2591: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. 依照提示 先安装 npm i --save-dev @types/node 然后在tsconfig.json的compilerOptions.types节点添加node { "compilerOptions": { ..."types": ["vite/client","node"], ... }, "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"] } 配置完成后,错误提示消失
|
请发表评论