Comments (8)
ReadableStream
and File
types will not be imported by default unless the dom
library has been included in your TypeScript config.
@AliakseiBychyk, try adding this to your tsconfig.json
:
{
...
"compilerOptions": {
"lib": [
...
"dom"
]
}
}
As a side note, I'm not convinced that using the dom
library's ReadableStream
was the intention here, since the rest of this package uses the NodeJS.ReadableStream
type instead. I'm happy to make a PR to change this to NodeJS.ReadableStream
if you agree.
from node-sdk-core.
@alexpls I think that's a good idea, feel free to open that PR. Thanks
from node-sdk-core.
Glad to hear it's working @AliakseiBychyk!
@dpopp07 I've opened up a PR to use NodeJS.ReadableStream
instead of DOM ReadableStream
.
I reckon this issue can be closed now, right?
from node-sdk-core.
Resolved with #13
Thanks @alexpls
from node-sdk-core.
Interesting, I've not see this problem. What version of TypeScript are you using?
from node-sdk-core.
TypeScript v.3.4.2
I found that someone already described the similar issue on Stackoverflow: https://stackoverflow.com/questions/55340159/receiving-ts2304-cannot-find-name-file-ts2304-cannot-find-name-readablest
Previously I used 'watson-developer-cloud' v.3.18.1 it had build-in lib, but newer version 4.0.1 has dependency on 'ibm-cloud-sdk-core'.
from node-sdk-core.
@AliakseiBychyk I tried installing v3.4.2 and creating a sample project depending on v4.0.1. I am not getting any errors. Will you list some specific steps I can follow to reproduce this issue?
from node-sdk-core.
@alexpls Thanks, actually --lib dom
in compiler options fixed the problem.
Since my app runs only on server-side, I didn't include 'dom' to the ts compiler options. It seems to me reasonable to change ReadableStream
type to NodeJS.ReadableStream
.
from node-sdk-core.
Related Issues (20)
- Bug in DEBUG ? HOT 5
- Latest version creates runtime error when bundled: `Class constructor BaseService cannot be invoked without 'new'` HOT 10
- Update axios version to 0.25.0 HOT 2
- Typescript Compilation: Cannot find name 'File' HOT 1
- hit UnhandledPromiseRejectionWarning when using this module with `https://github.com/IBM/cloudant-node-sdk` HOT 10
- Error: EISDIR: illegal operation on a directory HOT 2
- CVE-2022-36313 found in file-type HOT 3
- upgrade axios-cookiejar-support to support axios 1.0 HOT 11
- high severity in jsonwebtoken <=8.5.1 HOT 4
- ibm-cloud-sdk-core is now 4.0.0 which includes major upgrade of axios HOT 2
- Error after 4.0.1 release -JsonWebTokenError: secret or public key must be provided HOT 5
- VpcInstanceAuthenticator uses wrong version, no option to change it HOT 5
- Vulnerability: ibm-cloud-sdk-core is using a vulnerable version of jsonwebtoken HOT 1
- CVE-2022-25883 on the semver module used in the package HOT 3
- CVE-2023-45857 on the axios module used in the package HOT 6
- CIEBot applications failed to start with 'ERR_PACKAGE_PATH_NOT_EXPORTED' after upgrade to node-sdk-core to v4.1.4 HOT 2
- Missing @types/debug into package.json (devDependencies) HOT 2
- Package Vulnerability: axios HOT 10
- Fix CVE-2023-26159 updating to axios v1.6.4 HOT 2
- move some dependencies to devdependencies HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-sdk-core.