Could not find a declaration file for module '@reactivex/rxjs' (5.5.x)
See original GitHub issueRxJS version: 5.5.0, 5.5.1, 5.5.2
Code to reproduce: index.ts
import { Subject } from "@reactivex/rxjs";
const test = new Subject<boolean>();
test.next(true);
package.json
{
"dependencies": {
"@reactivex/rxjs": "5.5.0",
"typescript": "^2.5.3"
}
}
*tsconfig.json*
```json
{
"compilerOptions": {
"noImplicitAny": true
}
}
Expected behavior: No errors.
Actual behavior:
index.ts(1,25): error TS7016: Could not find a declaration file for module ‘@reactivex/rxjs’. ‘C:/Users/mattd/Source/Examples/rxjs-bug/node_modules/@reactivex/rxjs/index.js’ implicitly has an ‘any’ type. Try
npm install @types/@reactivex/rxjs
if it exists or add a new declaration (.d.ts) file containingdeclare module '@reactivex/rxjs';
Additional information:
The package.json
of rxjs contains "typings": "./dist/package/typings/Rx.d.ts"
, but there is no typings
folder in the package
directory. I expect that it should be changed to "typings": "./dist/typings/Rx.d.ts"
, because that appears to work.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Could not find a declaration file for module 'rxjs' - Stack Overflow
the error was show only on the vscode and not on the tsc in the terminal. so i understood that the problem was...
Read more >could not find a declaration file for module 'rxjs'. - You.com
React Typescript throws the error, could not find a declaration file for module, due to number of reasons. Check out the possible solutions...
Read more >Installation Instructions - RxJS
If you receive an error like error TS2304: Cannot find name 'Promise' or error TS2304: Cannot find name 'Iterable' when using RxJS you...
Read more >rxjs - npm
Reactive Extensions for modern JavaScript. Latest version: 7.8.0, last published: 10 days ago. Start using rxjs in your project by running ...
Read more >How to fix error TS7016: Could not find a declaration file for ...
Try `npm install @types/XYZ` if it exists or add a new declaration (.d. · declare module 'XYZ';. Lastly, you also need to add...
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
Thanks for taking the time to file the issue @mdekrey! I confirmed this myself. The
package.json
needs to point to"typings": "./dist/typings/Rx.d.ts",
ortypings
needs to be in./dist/package
.Thoughts @benlesh?
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.