你瞅啥呢

随笔分类 -  next.js

摘要:2024-03-06 Invalid schematic "entity". Please, ensure that "entity" exists in this collection.==》你应该使用了不正确的命令这个问题,其实就是文心一言误导了我,它告诉我创建实体类的命令为: nest g entity 你的实体类名称 但实际上,创建实体类应该用class,而不是entity。 所以,解决方案为更正命令,正确命令为: nest g class 你的实体类名称 但是,但是!上面这个命令不会生成entity,你 阅读全文
posted @ 2024-03-06 17:59 叶乘风 阅读(54) 评论(0) 推荐(0) 编辑
摘要:2024-03-06 Module '"@nestjs/platform-express"' has no exported member 'ExpressModule'.找不到ExpressModule这个模块问题描述:nestjs后端开发,遇到跨域问题,打算用express来配合处理,结果引入express的一个模块失败。 app.modules.ts import { MiddlewareConsumer, Module, NestModule } from '@nestjs/common'; imp 阅读全文
posted @ 2024-03-06 11:32 叶乘风 阅读(73) 评论(0) 推荐(0) 编辑
摘要:2024-03-06 NestJs学习日志之跨域新建一个跨域中间件(如:cors.middleware.ts),并把它导入到项目根目录的app.modules.ts里面使用。 中间件代码如下: import { Injectable, NestMiddleware } from "@nestjs/common"; @Injectable() // 阅读全文
posted @ 2024-03-06 11:27 叶乘风 阅读(117) 评论(0) 推荐(0) 编辑
摘要:2024-03-06 NestJs学习日志之新建nest项目,运行启动命令nest start报错:Could not find TypeScript configuration file "tsconfig.json". ==》你应该在nest项目里面运行启动命令,而不是其他的目录如题,低级错误。具体报错: Could not find TypeScript configuration file "tsconfig.json". Please, ensure that you are running this command in the appropriate direct 阅读全文
posted @ 2024-03-06 10:19 叶乘风 阅读(179) 评论(0) 推荐(0) 编辑
摘要:2023-11-23 npm install -g create-next-app ==>全局安装next,请确保你的node版本大于等于18.17.0PS D:\xls\box> npm install -g create-next-app npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'create-next-app@14.0.3', npm WARN 阅读全文
posted @ 2023-11-23 14:30 叶乘风 阅读(407) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示