npm 调试仍然显示找不到模块:错误:替换路径后无法解析“@utils/time/time”

编程入门 行业动态 更新时间:2024-10-04 17:20:39

npm 调试仍然显示<a href=https://www.elefans.com/category/jswz/34/1771416.html style=找不到模块:错误:替换路径后无法解析“@utils/time/time”"/>

npm 调试仍然显示找不到模块:错误:替换路径后无法解析“@utils/time/time”

当我使用这个

npm run start
命令启动项目时,显示错误:

ERROR in ./node_modules/js-wheel/dist/index.js 6:0-58
Module not found: Error: Can't resolve '@auth/extension/AuthHandler' in '/Users/John/source/reddwarf/frontend/ai-web/node_modules/js-wheel/dist'

ERROR in ./node_modules/js-wheel/dist/index.js 7:0-49
Module not found: Error: Can't resolve '@utils/graphic/RdColor' in '/Users/John/source/reddwarf/frontend/ai-web/node_modules/js-wheel/dist'

ERROR in ./node_modules/js-wheel/dist/index.js 8:0-44
Module not found: Error: Can't resolve '@utils/file/RdFile' in '/Users/John/source/reddwarf/frontend/ai-web/node_modules/js-wheel/dist'

我已经替换了

js-wheel
相对路径,运行npm update命令刷新依赖。这是
./node_modules/js-wheel/dist
中的 index.js 文件,现在看起来像:

import { ResponseHandler } from "./src/net/rest/ResponseHandler";
import { RequestHandler } from "./src/net/rest/RequestHandler";
import { WheelGlobal } from "./src/model/immutable/WheelGlobal";
import { TimeUtils } from "./src/utils/time/time";
import { ResponseCode } from "./src/net/rest/ResponseCode";
import { AuthHandler } from "./src/auth/extension/AuthHandler";
import { RdColor } from "./src/utils/graphic/RdColor";
import { RdFile } from "./src/utils/file/RdFile";
export { ResponseHandler, RequestHandler, WheelGlobal, TimeUtils, ResponseCode, AuthHandler, RdColor, RdFile };

为什么还显示这个错误?我应该怎么做才能解决这个问题?我也尝试清除缓存

npm cache clean --force
并使用
npm install
重新安装依赖项,仍然无法工作。

回答如下:

更多推荐

npm 调试仍然显示找不到模块:错误:替换路径后无法解析“@utils/time/time”

本文发布于:2024-05-30 18:10:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1770777.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:找不到   路径   模块   错误   npm

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!