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

Cannot find module 'file:https://xxx' when vite.config.ts import absolute path #9617

Closed
7 tasks done
janceChun opened this issue Aug 11, 2022 · 2 comments · Fixed by #9642
Closed
7 tasks done

Cannot find module 'file:https://xxx' when vite.config.ts import absolute path #9617

janceChun opened this issue Aug 11, 2022 · 2 comments · Fixed by #9642
Labels
p3-minor-bug An edge case that only affects very specific usage (priority) regression The issue only appears after a new release

Comments

@janceChun
Copy link

Describe the bug

when import absolute path in vite.config.ts [email protected] , it thrown an Error Cannot find module 'file:https://xxx', but it workwell in [email protected]

image

Reproduction

import absolute path in vite.config.ts

System Info

System:
    OS: macOS 12.2
    CPU: (8) arm64 Apple M1 Pro
    Memory: 115.59 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
  Browsers:
    Chrome: 104.0.5112.79
    Firefox: 103.0.2
    Safari: 15.3
  npmPackages:
    @vitejs/plugin-legacy: ^1.4.3 => 1.8.2
    @vitejs/plugin-vue2: ^1.1.2 => 1.1.2
    vite: ^3.0.5 => 3.0.5

Used Package Manager

yarn

Logs

No response

Validations

@janceChun
Copy link
Author

[email protected] can import ts file from absolute path, [email protected] will thrown an Error Cannot find module

[email protected] can import nodejs file from absolute path, [email protected] will thrown an Error Cannot find module

@sapphi-red sapphi-red added p3-minor-bug An edge case that only affects very specific usage (priority) regression The issue only appears after a new release labels Aug 11, 2022
@sapphi-red
Copy link
Member

[email protected] can import ts file from absolute path, [email protected] will thrown an Error Cannot find module

This one is same with #9202.

@sapphi-red sapphi-red linked a pull request Aug 11, 2022 that will close this issue
9 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Aug 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-minor-bug An edge case that only affects very specific usage (priority) regression The issue only appears after a new release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants