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

Error when running with vite #11

Open
Yanren1225 opened this issue Mar 9, 2022 · 3 comments
Open

Error when running with vite #11

Yanren1225 opened this issue Mar 9, 2022 · 3 comments

Comments

@Yanren1225
Copy link

$ yarn dev
yarn run v1.22.17
warning ../package.json: No license field
$ vite --host
error when starting dev server:
Error: The following dependencies are imported but could not be resolved:

  vue3-pdfjs/components/vue-pdf/vue-pdf-props (imported by /Users/nihaocun/Code/caseable-nft-web/src/page/introduction/index.vue)
  pdfjs-dist/types/src/display/api (imported by /Users/nihaocun/Code/caseable-nft-web/src/page/introduction/index.vue)

Are they installed?
    at optimizeDeps (/Users/nihaocun/Code/caseable-nft-web/node_modules/vite/dist/node/chunks/dep-9c153816.js:55767:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async runOptimize (/Users/nihaocun/Code/caseable-nft-web/node_modules/vite/dist/node/chunks/dep-9c153816.js:56647:44)
    at async Server.httpServer.listen (/Users/nihaocun/Code/caseable-nft-web/node_modules/vite/dist/node/chunks/dep-9c153816.js:56662:21)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

But I'm afraid I did install it, is there any configuration that needs to be done?

Incidentally, there is no problem using vite build

@pittQ
Copy link

pittQ commented May 17, 2022

我也遇到了同样的问题,请问是怎么解决的?

@pittQ
Copy link

pittQ commented May 17, 2022

The following dependencies are imported but could not be resolved:

vue3-pdfjs/components/vue-pdf/vue-pdf-props (imported by F:/WitBus/sz-bus-info-distribute-cms/src/views/components/PDFPreviewDialog.vue?id=0)
pdfjs-dist/types/src/display/api (imported by F:/WitBus/sz-bus-info-distribute-cms/src/views/components/PDFPreviewDialog.vue?id=0)

Are they installed?

@Yanren1225
Copy link
Author

我也遇到了同样的问题,请问是怎么解决的?

没解决,反正 PDF 里面只有一些文字和图片,我直接手写了。这个库还要占用 300 KB,PDF 还要几 MB,算下来还是手写吧,省空间哈哈。

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

2 participants