-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to compile without other dependencies, Dropbox, Emscripten, HTML5FS &etc.? #263
Comments
Are you using the ForkTsCheckerWebpackPlugin in webpack? |
I'm also having this problem but only with Stats class
Trying to exclude the .d.ts file via tsconfig.json didn't work as usual - probably because of this
EDIT:
|
I was able to alleviate the two errors above by matching the version of the types in my project's package.json to those in browserfs (1.4.3):
|
I'm happy to accept PRs that improve compatibility here. |
Help!!
any suggestion would be appreciated |
@dsl400 - There is no types package for BrowserFS, since BrowserFS is already written in TypeScript. :-) |
@jcoutch you're right, but it's broken. |
Jumping on this thread to add my solution. Since I'm only really using a subset of the API I just created a simple type file and modified my // browserfs.d.ts
declare module 'browserfs' {
export function configure(o: { fs: string, options: any }, onError: (e?: Error) => void): void;
} // tsconfig.json
{
...
"paths": {
"browserfs": [
"src/types/browserfs.d.ts"
]
},
...
} |
I followed shawn-bandy-urbag suggestion and installed explicit versions in to my host project.
I tried to create a PR to fixe theses issues but couldn't figure out how to get the |
Does this bug still exist? |
Closing (stale). If you would like to reopen this issue, please do so by creating a new issue in the relevant repositories of @browser-fs |
Related: #200 #233
Using a package that recommends BrowserFS, so I run
npm i -S browserfs; npm i -D @types/browserfs
. Then Iimport
it like so:Now I get these errors (Angular 7.1 app):
Am I doing something wrong?
EDIT: Progress thus far has been made by:
Adding below
export default class Stats implements fs.Stats {
innode_modules/browserfs/dist/node/core/node_fs_stats.d.ts
:Replaced
NodeBuffer
withBuffer
innode_modules/browserfs/dist/node/backend/Emscripten.d.ts
.The text was updated successfully, but these errors were encountered: