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

Bug: 登录接口报ERR_MODULE_NOT_FOUND #4346

Closed
5 tasks done
p-m-q opened this issue Sep 9, 2024 · 7 comments
Closed
5 tasks done

Bug: 登录接口报ERR_MODULE_NOT_FOUND #4346

p-m-q opened this issue Sep 9, 2024 · 7 comments

Comments

@p-m-q
Copy link

p-m-q commented Sep 9, 2024

Version

Vben Admin V5

Describe the bug?

在官方antd demo中,用户进行登录时,调用登录接口报错:
[Error Handler] Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'D:\workspace\vscode\vue-vben-admin\node_modules.pnpm\std-env@3.7.0\node_modules\std-env\dist\index.mjs' imported from D:\workspace\vscode\vue-vben-admin\apps\backend-mock.nitro\dev\index.mjs
at finalizeResolution (node:internal/modules/esm/resolve:265:11)
at moduleResolve (node:internal/modules/esm/resolve:933:10)
at defaultResolve (node:internal/modules/esm/resolve:1157:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:390:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:359:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:234:38)
at ModuleWrap. (node:internal/modules/esm/module_job:87:39)
at link (node:internal/modules/esm/module_job:86:36)

Reproduction

System Info

Windows11, node v20.12.1, pnpm v9.9.0 google浏览器,源码是最新版本vben-admin-pro@5.2.2

Relevant log output

Validations

@likui628
Copy link
Collaborator

likui628 commented Sep 9, 2024

你执行什么命令启动的antd demo

@p-m-q
Copy link
Author

p-m-q commented Sep 9, 2024

你执行什么命令启动的antd demo
pnpm run dev:antd
std-env这个模块其实有的,通过pnpm info std-env 可以看到对应的包信息的

@likui628
Copy link
Collaborator

likui628 commented Sep 9, 2024

要不然你调用下 pnpm run reinstall 然后再试一下

@wangz-code
Copy link

第一次安装完毕之后 貌似需要先在根目录执行 pnpm run build 完毕之后 在运行项目 不然打包的时候回报错

@p-m-q
Copy link
Author

p-m-q commented Sep 10, 2024

要不然你调用下 pnpm run reinstall 然后再试一下

我还是重新搞了个项目再安装,才好使了。reinstall会报错

@p-m-q
Copy link
Author

p-m-q commented Sep 10, 2024

第一次安装完毕之后 貌似需要先在根目录执行 pnpm run build 完毕之后 在运行项目 不然打包的时候回报错

我还没走到build哪一步,才开始研究这个框架,谢谢你的提醒

@meishaonian123
Copy link

有没有遇到按照文档步骤启动@vben/web-antd 项目时报错Unable to find an available port (tried 5320 on host "localhost"),但实际5320端口并未被占用
image

@github-actions github-actions bot locked and limited conversation to collaborators Oct 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants