-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDuplicateAn existing issue was already createdAn existing issue was already created
Milestone
Description
Long story short, our build process before firing "npm start" command creates symlink to node_modules folder in the root folder of the project taking it from some other place.
Our npm start command setup in package.json:
"scripts": {
"prestart": "npm install",
"start": "tsc @App/Other/Gulp/preCompile.txt && gulp build",
...
}
So it does run npm install, but because we symlinked the node_modules and npm detects all packages installed, it jumps into "tsc @App/Other/Gulp/preCompile.txt" but this fails, because compiler tries accessing files both from symlink local folder "node_modules" and original "node_modules", exact lines from log:
> tsc @App/Other/Gulp/preCompile.txt && gulp build
../../../../../../Resources/Development/node_modules/@types/angular/index.d.ts(17,21): error TS2300: Duplicate identifier 'angular'.
../../../../../../Resources/Development/node_modules/@types/angular/index.d.ts(18,21): error TS2300: Duplicate identifier 'ng'.
node_modules/@types/angular/index.d.ts(17,21): error TS2300: Duplicate identifier 'angular'.
node_modules/@types/angular/index.d.ts(18,21): error TS2300: Duplicate identifier 'ng'.
I have tried setting typeroots in tsconfig.json to "node_modules/@types" which is default value, but it did not help. Seems like it could be typescript 2.0 bug, as the original path is relative to the project root...
gbryer, MichaReiser, Tonimo, leonyu, dzearing and 1 more
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDuplicateAn existing issue was already createdAn existing issue was already created