Questions tagged [vscode-jsconfig]
44 questions
1
vote
1 answer
How to debug when jsconfig.json declarations stop resolving and I can't tell why?
I have a fresh Next.js project with a clean set of jsconfig declarations as per:
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"public/*": ["./public/*"],
"styles/*": ["./src/styles/*"],
…

Jay
- 326
- 2
- 18
1
vote
0 answers
jsconfig.js file not working with symlink package
I have a React node repo that imports from a custom node repo. Both repos are located in my local machine. I have jsconfig.js files in both repo, using VS code. However, only the React repo is recognizing the jsconfig.js file. The jsconfig.js file…

Bear Bile Farming is Torture
- 4,317
- 4
- 27
- 61
1
vote
1 answer
How to add nested path aliases in vscode jsconfig?
Background
I have a config like this:
{
"compilerOptions": {
"baseUrl": "./src",
"paths": {
"common": ["./common/*"],
"components": ["./components/*"],
"services": ["./services/*"],
"styles": ["./styles/*"],
…

Ajay Gupta
- 1,944
- 2
- 21
- 36
1
vote
0 answers
jsconfig.json doesn't seem to work in VSCode?
This is a little weird.
I tried to shorten my import statements with this jsconfig.json:
{
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@/*": ["./*"]
}
}
}
Now the weird thing is that Intellisense…

Jonas Möller
- 11
- 4
1
vote
1 answer
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'models' imported from
I'm trying to configure my project to use absolute imports, so I have configured jsconfig.json as follows:
{
"compilerOptions": {
"baseUrl": "./src",
"module": "commonjs",
"target": "es2016"
},
"exclude":…

Renaud is Not Bill Gates
- 1,684
- 34
- 105
- 191
1
vote
0 answers
VSCode `typeAcquisition` for browser imports
I want to have .d.ts typings for Lit which will be served from the esm.sh CDN. I want to use VSCode's built-in type acquisition system to get Intellisense for the Javascript files (which will be served directly to the user). I have tried to use a…

Brian
- 388
- 3
- 8
1
vote
1 answer
How can I get automatic absolute imports for inside a Docker container?
I'm using VSCode to work on a NodeJS project on a second (remote) machine. This project runs in a Docker container on that second machine. I don't like relative imports, so I try to avoid them. I do like automatic imports, so I try to use them as…

Timmiej93
- 1,328
- 1
- 16
- 35
1
vote
1 answer
Exclude folder/lib from VSCode suggestion ? with jsconfig.json?
VSCode suggestions are very slow on my project, and especially my BFF snippet c that writes console.log takes 5 seconds to execute.
I can see in the suggestions that there are a lot of stuff coming from some libs I installed that I don't use that…

arnaudambro
- 2,403
- 3
- 25
- 51
1
vote
1 answer
CRA + Yarn 2 + jsconfig.json = Can't run unit tests
I have the following configuration in my jsconfig.json file:
{
"compilerOptions": {
"baseUrl": "./src"
},
"include": ["src"]
}
Which lets me do this:
import { App } from 'components'
import * as actions from 'actions/app.actions'
Instead…

Summer
- 1,175
- 8
- 18
0
votes
0 answers
how to setup a jsconfig.json for node.js
So I started to learning Node.js recently so far the gatherings all are good but I came across the concept of setup with jsconfig.json which largely helps to free the clutters made in mentioning the relative path and I decided to setup the same in…

Madhu mohan
- 1
- 2
0
votes
0 answers
Paths alias intellisense of vscode in jsconfig not working
My source:
https://github.com/powerfulh/Vite
My vscode does not working for import paths intellisense in *.js, *.vue with jsconfig
(*.ts is working with ts config)
My jsconfig:
https://github.com/powerfulh/Vite/blob/master/jsconfig.json
I tried…

powerfulH
- 1
- 2
0
votes
0 answers
jsconfig.json affects vscode's prompt for pinia method
jsconfig.json affects vscode's prompt for pinia method
jsconfig.json file
{
"compilerOptions": {
"target": "es2016",
"allowSyntheticDefaultImports": false,
"baseUrl": "./",
"paths": {
"@/*": [
…

小小子
- 11
- 3
0
votes
0 answers
Ctrl + click does not work with aliases path in VS Code
I'm using VS Code for my Vuejs project and I resolve the "src" path with "@", here is my config:
And here is where I use the import statement with "@"
The web runs fine but I cannot click to go to my file. Please help

Celty
- 21
- 3
0
votes
1 answer
How can I add JSDoc comments inside functions?
How can I add valid JSDoc comments inside functions? Is there a jsconfig.json setting I can use? E.g.
// Doesn't work inside vscode
function arrayMove(index) {
/**
* @param {Number} index
* @return {Array}
*/
// ...
}
instead of
//…

Ricky Boyce
- 1,772
- 21
- 26
0
votes
0 answers
VSCode jsconfig.json resolve .vue file without the extension?
I have a jsconfig.json like the following:
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
"exclude": [
"node_modules",
…

Cyril N.
- 38,875
- 36
- 142
- 243