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

Incorrect warning about missing baseUrl in extended tsconfig.json #2119

Closed
JounQin opened this issue Mar 21, 2022 · 6 comments
Closed

Incorrect warning about missing baseUrl in extended tsconfig.json #2119

JounQin opened this issue Mar 21, 2022 · 6 comments

Comments

@JounQin
Copy link

JounQin commented Mar 21, 2022

context: vitejs/vite#3758

@evanw
Copy link
Owner

evanw commented Mar 24, 2022

You will have to provide more information than this. I don't know what you're talking about. What is wrong, and what is the desired behavior? Why is the warning incorrect? Is baseUrl present in the same file that esbuild says it is missing in? Do you have example code that reproduces the issue? Note that I know nothing about Vite.

@JounQin
Copy link
Author

JounQin commented Mar 24, 2022

Describe the bug

baseUrl is already set in the project level tsconfig.json: https://github.com/JounQin/test/blob/vite/tsconfig.json#L4

The warning means vite is consuming the original tsconfig from node_modules, this is incorrect.

Reproduction

https://github.com/JounQin/test/tree/vite

System Info

Output of npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers:

  System:
    OS: macOS 12.0
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 23.45 GB / 64.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 12.22.1 - ~/.nvm/versions/node/v12.22.1/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.12 - ~/.nvm/versions/node/v12.22.1/bin/npm
  npmPackages:
    @vitejs/plugin-vue: ^1.2.3 => 1.2.3 
    vite: ^2.3.7 => 2.3.7

Used package manager: yarn

Logs

node_modules/@1stg/tsconfig/app.json:12:8: warning: Non-relative path "src/*" is not allowed when "baseUrl" is not set (did you forget a leading "./"?)
    12 │         "src/*"

Before submitting the issue, please make sure you do the following

@JounQin
Copy link
Author

JounQin commented Mar 24, 2022

@evanw Just copied the original context from the original issue, it seems warning from https://github.com/evanw/esbuild/blob/master/internal/resolver/tsconfig_json.go#L319

@evanw
Copy link
Owner

evanw commented Mar 24, 2022

Yes, I read the link. That's just the same information. You still aren't describing what's wrong or what the desired behavior is. It also links to a readme with a single word "test" that has no information about how to demonstrate the problem.

@JounQin
Copy link
Author

JounQin commented Mar 24, 2022

@evanw

baseUrl is already set in the project level tsconfig.json: https://github.com/JounQin/test/blob/vite/tsconfig.json#L4

The warning means vite is consuming the original tsconfig from node_modules, this is incorrect.

Didn't I? For the reproduction, you can simply run yarn dev to show the incorrect warning.

@evanw
Copy link
Owner

evanw commented Mar 24, 2022

you can simply run yarn dev to show the incorrect warning

Thanks. That was not evident.

@evanw evanw closed this as completed in 2244c09 Mar 27, 2022
zhusjfaker pushed a commit to speedy-js/esbuild that referenced this issue Mar 28, 2022
hardfist pushed a commit to speedy-js/esbuild that referenced this issue Mar 28, 2022
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