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
When custom-tslint-formatters is used as a dependency of a module with npm-shrinkwrap.json that is required by a TypeScript module for Node which itself depends on @types/node, the @types/node get installed twice into node_modules (using npm@3).
When building the TypeScript module, having more than one @types/node of the same version causes a ton of errors about duplicate identifiers because TypeScript gets two definitions for the global Node symbols.
Here's a sample of these errors with both conflicting paths visible:
The only workaround for now is to ensure only one declaration is installed, but this is impossible for packages that are dependencies.
As this package does not export any typings, these @types/ dependencies could be moved to devDependencies to avoid such behavior until the root issue is resolved within TypeScript compiler.
The text was updated successfully, but these errors were encountered:
https://github.com/KingHenne/custom-tslint-formatters/blob/f2376dfe122b0b03d96b55a7c70e6bffa26ea4ce/package.json#L36-L37
When
custom-tslint-formatters
is used as a dependency of a module withnpm-shrinkwrap.json
that is required by a TypeScript module for Node which itself depends on@types/node
, the@types/node
get installed twice intonode_modules
(usingnpm@3
).When building the TypeScript module, having more than one
@types/node
of the same version causes a ton of errors about duplicate identifiers because TypeScript gets two definitions for the global Node symbols.Here's a sample of these errors with both conflicting paths visible:
In this example,
@some-company/ts-build-tools
depends oncustom-tslint-formatters
and hasnpm-shrinkwrap.json
, sonpm ls
looks like this:Related issue (with no solution as of now): microsoft/TypeScript#6496
The only workaround for now is to ensure only one declaration is installed, but this is impossible for packages that are dependencies.
As this package does not export any typings, these
@types/
dependencies could be moved todevDependencies
to avoid such behavior until the root issue is resolved within TypeScript compiler.The text was updated successfully, but these errors were encountered: