You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In My tsconfig.json I defined some paths like, there is none called 'events'
"paths": {
"@base/*": [
"src/base/*"
]
}
and I defined the baseUrl
"baseUrl": "."
inside of the StateManager.ts I import the EventEmitter from the default package called 'events'
import{EventEmitter}from'events';
PROBLEM:
adding the baseUrl inside of the tsconfig.json lets tsc-alias think that the import of EventEmitter from 'events' is meant to be a import of the folder named 'events'. removing the baseUrl from the tsconfig.json or just only running tsc without running tsc-alias after it "fixes" the problem, but I need to use tsc-alias because I needed to remove my relative imports because they got quite long, same thing is the reason why I need to set the baseUrl.
QUESTION:
Is there something I can do in the configuration to fix this problem with tsc-alias or could I set the removeComments flag in the tsconfig.json to false and add some type of comment that will tell tsc-aliases to do the right thing?
Tryed To think
Added Version Information
Told the "exact" Problem
been patient and waited for the reply
got reply
got some kind of fix
The text was updated successfully, but these errors were encountered:
Node Version: 16.14.2
tsc-alias Version: ^1.6.5
tsc Version: 4.5.5
I have a file structure of
In My tsconfig.json I defined some paths like, there is none called 'events'
and I defined the baseUrl
inside of the
StateManager.ts
I import the EventEmitter from the default package called 'events'PROBLEM:
adding the
baseUrl
inside of thetsconfig.json
letstsc-alias
think that the import of EventEmitter from 'events' is meant to be a import of the folder named 'events'. removing thebaseUrl
from thetsconfig.json
or just only runningtsc
without runningtsc-alias
after it "fixes" the problem, but I need to usetsc-alias
because I needed to remove my relative imports because they got quite long, same thing is the reason why I need to set thebaseUrl
.QUESTION:
Is there something I can do in the configuration to fix this problem with tsc-alias or could I set the
removeComments
flag in thetsconfig.json
to false and add some type of comment that will tell tsc-aliases to do the right thing?The text was updated successfully, but these errors were encountered: