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
// A *self-contained* demonstration of the problem follows...// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.import*asnonTypedModulefrom'<non-typed-npm-module>'
error TS7016: Could not find a declaration file for module '<non-typed-npm-module>'
The text was updated successfully, but these errors were encountered:
stephenzsy
changed the title
Fails to resolving types in non (../)*node_modules/@types
Fails to resolve types in non (../)*node_modules/@types
Dec 9, 2017
stephenzsy
changed the title
Fails to resolve types in non (../)*node_modules/@types
Fails to resolve types in non (../)*node_modules/@types pattern directories
Dec 9, 2017
typeRoots affects global definitions. An import statement will go through module resolution to try and find a target.
If you really want to import things from a nested node_modules directory that wouldn't normally be accessible, you could use path mapping (see the "module resolution" link).
ghost
added
the
Question
An issue which isn't directly actionable in code
label
Dec 10, 2017
TypeScript Version: 2.7.0-dev.20171209
Code
With specific typeRoots and baseUrl
tsconfig.json
There exists type declaration files in
Expected behavior:
Compile without error
Actual behavior:
The text was updated successfully, but these errors were encountered: