Error: Cannot find 'rxjs.imports.ts' in the compiled program. Has it been imported?
See original GitHub issueI’m getting this error when running the linter:
Error: Cannot find '/path/to/app/src/rxjs.imports.ts' in the compiled program. Has it been imported?
at Walker.findSourceFile (/path/to/app/node_modules/rxjs-tslint-rules/dist/rules/rxjsAddRule.js:136:15)
at Walker.walkFile (/path/to/app/node_modules/rxjs-tslint-rules/dist/rules/rxjsAddRule.js:146:35)
at Walker.onSourceFileEnd (/path/to/app/node_modules/rxjs-tslint-rules/dist/rules/rxjsAddRule.js:48:31)
at Walker.AddedWalker.visitNode (/path/to/app/node_modules/rxjs-tslint-rules/dist/support/added-walker.js:41:18)
at Walker.SyntaxWalker.walk (/path/to/app/node_modules/tslint/lib/language/walker/syntaxWalker.js:24:14)
at Rule.AbstractRule.applyWithWalker (/path/to/app/node_modules/tslint/lib/language/rule/abstractRule.js:31:16)
at Rule.applyWithProgram (/path/to/app/node_modules/rxjs-tslint-rules/dist/rules/rxjsAddRule.js:15:21)
at Linter.applyRule (/path/to/app/node_modules/tslint/lib/linter.js:174:29)
at /path/to/app/node_modules/tslint/lib/linter.js:119:85
at Object.flatMap (/path/to/app/node_modules/tslint/lib/utils.js:151:29)
The linter found the errors though and I could fix the problems, but I’m still getting this. I have added the rxjs-add
ruleset following the instructions in the README file and I’ve imported my rxjs.imports.ts
file in main.ts
, just like in the example code.
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
angular - can't Resolve rxjs - Stack Overflow
I got this error because of an older version of rxjs and Angular 6 needs the latest version of rxjs. This command installs...
Read more >RXJS own d.ts file error · Issue #3654 · ReactiveX/rxjs - GitHub
This happens when you haven't updated other imports that require Subject etc. from the old location. Update the other imports in your other ......
Read more >cannot find module 'rxjs/rx' - You.com | The AI Search Engine ...
I am using angular CLI and visual studio code. my suggested import for Observable is import { Observable } from 'rxjs/internal/observable'; although this ......
Read more >Cannot find module 'rxjs-compat/Observable' error | bobbyhadz
To solve the error "Cannot find module 'rxjs-compat/Observable'", make sure to install the package by opening your terminal in your project's root directory...
Read more >48 answers on StackOverflow to the most popular Angular ...
Angular exception: Can't bind to 'ngForIn' since it isn't a known native ... Importing lodash into angular2 + typescript application; How to detect...
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 Free
Top 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
@bjohnson-va You shouldn’t need to remove
tsconfig.e2e.json
. Angular creates that file. It doesn’t - unless things have very recently changed - create a TSLint configuration file in thee2e
directory. You can create that file to disable the RxJS-related rule (using TSLint’s relative-configuration-file mechanism).I would not recommend removing
tsconfig.e2e.json
, even if you are not using end-to-end tests.I don’t actually have any e2e tests at the moment, so removing my
tsconfig.e2e.json
and renamingtslint.e2e.json
=>tslint.json
did the trick.Thanks for the insight.