Error: Cannot find ./src/rxjs.imports.ts
See original GitHub issueGetting this error every time although it works and shows lint errors.
Log:
Error: Cannot find ./src/rxjs.imports.ts
at Walker.findSourceFile (/Users/Herc/Documents/RADAR/RADAR-Dashboard/node_modules/rxjs-tslint-rules/dist/rules/rxjsAddRule.js:134:15)
at Walker.walkFile (/Users/Herc/Documents/RADAR/RADAR-Dashboard/node_modules/rxjs-tslint-rules/dist/rules/rxjsAddRule.js:144:35)
at Walker.onSourceFileEnd (/Users/Herc/Documents/RADAR/RADAR-Dashboard/node_modules/rxjs-tslint-rules/dist/rules/rxjsAddRule.js:48:31)
at Walker.AddedWalker.visitNode (/Users/Herc/Documents/RADAR/RADAR-Dashboard/node_modules/rxjs-tslint-rules/dist/support/added-walker.js:40:18)
at Walker.SyntaxWalker.walk (/Users/Herc/Documents/RADAR/RADAR-Dashboard/node_modules/tslint/lib/language/walker/syntaxWalker.js:24:14)
at Rule.AbstractRule.applyWithWalker (/Users/Herc/Documents/RADAR/RADAR-Dashboard/node_modules/tslint/lib/language/rule/abstractRule.js:31:16)
at Rule.applyWithProgram (/Users/Herc/Documents/RADAR/RADAR-Dashboard/node_modules/rxjs-tslint-rules/dist/rules/rxjsAddRule.js:15:21)
at Linter.applyRule (/Users/Herc/Documents/RADAR/RADAR-Dashboard/node_modules/tslint/lib/linter.js:176:29)
at /Users/Herc/Documents/RADAR/RADAR-Dashboard/node_modules/tslint/lib/linter.js:121:85
at Object.flatMap (/Users/Herc/Documents/RADAR/RADAR-Dashboard/node_modules/tslint/lib/utils.js:151:29)
ERROR: /Users/Herc/Documents/RADAR/RADAR-Dashboard/src/app/components/charts/chart-base/chart-base.component.ts[78, 8]: RxJS add import is missing from ./src/rxjs.imports.ts: debounceTime
Also had to add "no-unused-variable": false,
to tslint for "allowUnused": false
to work properly.
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
tslint rxjs-tslint-rules Cannot find '/users/whisher/projects/my ...
Cannot find '/users/whisher/projects/my/src/rxjs-imports.ts' in the compiled program. Has it been imported? How can I fix it ? or is it ...
Read more >ts-custom-error - npm
Start using ts-custom-error in your project by running `npm i ... import { CustomError } from 'ts-custom-error' class HttpError extends ...
Read more >[Solved]-tslint rxjs-tslint-rules Cannot find '/users/whisher ...
Coding example for the question tslint rxjs-tslint-rules Cannot find '/users/whisher/projects/my/src/rxjs-imports.ts' in the compiled program.
Read more >Import Statements in TypeScript: Which Syntax to Use
error TS1192 : Module '"thing"' has no default export. This means you tried to use import thing from "thing" but TS didn't find...
Read more >Installation Instructions - RxJS
To import only what you need, please check out this guide. CommonJS via npmlink. If you receive an error like error TS2304: Cannot...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@herkulano You might be interested in this issue and this comment. It introduces a somewhat cleaner way of making the
rxjs-add
rule play nice with@angular/cli
.The problem is that the Angular CLI runs TSLint three times:
src/
;src/
;e2e/
.If the central imports file is not included in the tests, it’s not available in the compiled TypeScript program that TSLint provides to the rules.
You can fix the problem by importing
./src/rxjs.imports.ts
intest.ts
:and in
e2e/app.po.ts
:I’ll improve the error thrown by the rule to better describe the situation.