启动vue报错如下,说dayjs/plugin/Duration模块没装。虽然启动了,但是页面白屏无法访问。

下午1:39:38 [vite] Failed to load source map for /src/utils/assets-retry.umd.js.
The following dependencies are imported but could not be resolved:

  dayjs/plugin/Duration (imported by /home/xjj/Documents/work/frontend/xxa-backstage_frontend/src/view/project-version/safety-education/around-cap/index.vue?id=0)

然后使用npm install又一堆报错,说依赖包不支持linux

Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

查了下代码,引用这个包的vue文件目前不需要用到。干脆直接把import这段代码注释掉

//import duration from 'dayjs/plugin/Duration'

页面访问正常了,包的问题就后面再说吧。

Logo

更多推荐