Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

本地启动找不到包 #48

Open
CodeFarmerier opened this issue May 9, 2024 · 4 comments
Open

本地启动找不到包 #48

CodeFarmerier opened this issue May 9, 2024 · 4 comments

Comments

@CodeFarmerier
Copy link

Bug report(问题描述)

Steps to reproduce(问题复现步骤)

  1. 使用pnpm dev的时候 报错
  2. 我根据报错路径去查找,发现是有这个文件,但是运行的时候没有build进去
  3. 以下是报错信息
    Error: Cannot find module '/Users/后端/node项目/nest-admin/src/common/dto/pager.dto'
    Require stack:
  • /Users/后端/node项目/nest-admin/dist/common/dto/pager.dto.js
  • /Users/后端/node项目/nest-admin/dist/modules/system/role/role.controller.js
  • /Users/后端/node项目/nest-admin/dist/modules/system/role/role.module.js
  • /Users/后端/node项目/nest-admin/dist/modules/system/menu/menu.module.js
  • /Users/后端/node项目/nest-admin/dist/modules/user/user.module.js
  • /Users/后端/node项目/nest-admin/dist/modules/system/log/log.module.js
  • /Users/后端/node项目/nest-admin/dist/modules/auth/auth.module.js
  • /Users/后端/node项目/nest-admin/dist/app.module.js
  • /Users/后端/node项目/nest-admin/dist/main.js
    at Function.Module.resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Function.Module.load (node:internal/modules/cjs/loader:922:27)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Function.OPENAPI_METADATA_FACTORY (/Users/后端/node项目/nest-admin/dist/common/dto/pager.dto.js:29:234)
    at /Users/后端/node项目/nest-admin/node_modules/.pnpm/@nestjs[email protected]
    @fastify[email protected]
    @nestjs[email protected]
    @[email protected]_class-t_rc635vf3pb3uuk3dyc4mkw3f7a/node_modules/@nestjs/swagger/dist/decorators/helpers.js:48:241
    at DecorateProperty (/Users/后端/node项目/nest-admin/node_modules/.pnpm/[email protected]/node_modules/reflect-metadata/Reflect.js:561:33)
    at Reflect.decorate (/Users/后端/node项目/nest-admin/node_modules/.pnpm/[email protected]/node_modules/reflect-metadata/Reflect.js:136:24)
    at __decorate (/Users/后端/node项目/nest-admin/dist/common/dto/pager.dto.js:4:92)
    at Object. (/Users/后端/node项目/nest-admin/src/common/dto/pager.dto.ts:19:3)

Screenshot or Gif(截图或动态图)

Snipaste_2024-05-09_22-30-57

Link to minimal reproduction(最小可在线还原demo)

Other relevant information(格外信息)

  • Your OS: macos
  • Node.js version: v18.18.0
  • Mysql version: 8.3
  • Redis version: 7.2.4
  • pnpm version:8.10.2
@CodeFarmerier
Copy link
Author

Snipaste_2024-05-09_22-41-11
dist目录中有这歌文件

@zjincHub
Copy link

找到解决方法了吗,我也遇到这个问题了

@zjincHub
Copy link

找到问题了,路径不能包含中文哈

@tymoony
Copy link

tymoony commented May 17, 2024

确实是中文路径的问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants