jvilk / BrowserFS

BrowserFS is an in-browser filesystem that emulates the Node JS filesystem API and supports storing and retrieving files from various backends.
Other
3.06k stars 215 forks source link

Cannot find type definitions, names, namespaces. #172

Closed elliotwesoff closed 7 years ago

elliotwesoff commented 7 years ago

Hello,

I'm trying to implement BrowserFS into my project in order to run unit tests on a script that reads and writes local files. When running npm start I'm getting a long list of errors at the end of the build process. Here's the output

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\core\util.d.ts
(1,1): error TS2688: Cannot find type definition file for 'node'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\backend\IsoFS.d.ts
(1,1): error TS2688: Cannot find type definition file for 'node'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\backend\ZipFS.d.ts
(1,1): error TS2688: Cannot find type definition file for 'node'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\backend\XmlHttpRequest.d.ts
(1,1): error TS2688: Cannot find type definition file for 'node'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\generic\locked_fs.d.ts
(1,1): error TS2688: Cannot find type definition file for 'node'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\backend\LocalStorage.d.ts
(1,1): error TS2688: Cannot find type definition file for 'node'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\backend\IndexedDB.d.ts
(1,1): error TS2688: Cannot find type definition file for 'node'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\generic\key_value_filesystem.d.ts
(1,1): error TS2688: Cannot find type definition file for 'node'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\backend\InMemory.d.ts
(1,1): error TS2688: Cannot find type definition file for 'node'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\backend\HTML5FS.d.ts
(10,37): error TS2304: Cannot find name 'FileEntry'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\backend\HTML5FS.d.ts
(16,9): error TS2304: Cannot find name 'FileSystem'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\backend\HTML5FS.d.ts
(1,1): error TS2688: Cannot find type definition file for 'filesystem'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\backend\HTML5FS.d.ts
(2,1): error TS2688: Cannot find type definition file for 'node'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\backend\Emscripten.d.ts
(1,1): error TS2688: Cannot find type definition file for 'node'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\backend\Dropbox.d.ts
(20,25): error TS2503: Cannot find namespace 'Dropbox'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\backend\Dropbox.d.ts
(30,68): error TS2503: Cannot find namespace 'Dropbox'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\backend\Dropbox.d.ts
(35,21): error TS2503: Cannot find namespace 'Dropbox'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\backend\Dropbox.d.ts
(41,51): error TS2503: Cannot find namespace 'Dropbox'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\backend\Dropbox.d.ts
(69,18): error TS2503: Cannot find namespace 'Dropbox'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\backend\Dropbox.d.ts
(1,1): error TS2688: Cannot find type definition file for 'node'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\backend\Dropbox.d.ts
(2,1): error TS2688: Cannot find type definition file for 'dropboxjs'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\generic\preload_file.d.ts
(1,1): error TS2688: Cannot find type definition file for 'node'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\core\file.d.ts
(1,1): error TS2688: Cannot find type definition file for 'node'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\core\node_fs_stats.d.ts
(1,1): error TS2688: Cannot find type definition file for 'node'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\core\file_system.d.ts
(1,1): error TS2688: Cannot find type definition file for 'node'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\core\api_error.d.ts
(35,22): error TS2420: Class 'ApiError' incorrectly implements interface 'ErrnoException'.
Types of property 'errno' are incompatible.
    Type 'ErrorCode' is not assignable to type 'string'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\core\api_error.d.ts
(1,1): error TS2688: Cannot find type definition file for 'node'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\core\FS.d.ts
(1,1): error TS2688: Cannot find type definition file for 'node'.

ERROR in C:\Users\Admin\ng2-project\node_modules\browserfs\dist\node\core\browserfs.d.ts
(1,1): error TS2688: Cannot find type definition file for 'node'.

Here's my Webpack config:

var path = require('path');
var webpack = require('webpack');
var CopyWebpackPlugin = require('copy-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ENV = process.env.ENV = 'development';
var HOST = process.env.HOST || 'localhost';
var PORT = process.env.PORT || 5265;

var metadata = {
    host: HOST,
    port: PORT,
    ENV: ENV
};

module.exports = {
    // static data for index.html
    metadata: metadata,

    // Emit SourceMap to enhance debugging
    devtool: 'source-map',

    devServer: {
        // This is required for webpack-dev-server. The path should
        // be an absolute path to your build destination.
        outputPath: path.join(__dirname, './build'),
        inline: true,
        historyApiFallback: {
            index: 'index.html'
        }
    },

    // Switch loaders to debug mode
    debug: true,

    node: {
        process: false,
        Buffer: false
    },

    entry: {
        'app': path.resolve(__dirname, "app/main.ts"),
        'test': path.resolve(__dirname, "test/main.ts")
    },

    // Config for our build file
    output: {
        path: path.resolve(__dirname, "./build"),
        publicPath: '/build/', // required for browser reference.
        filename: '[name].bundle.js',
        sourcemapFilename: '[name].map'
    },

resolve: {
        // Add `.ts` and `.tsx` as a resolvable extension.
        extensions: ['', '.ts', '.tsx', '.js'],
        alias: {
            'fs': 'browserfs/dist/shims/fs.js',
            'buffer': 'browserfs/dist/shims/buffer.js',
            'path': 'browserfs/dist/shims/path.js',
            'processGlobal': 'browserfs/dist/shims/process.js',
            'bufferGlobal': 'browserfs/dist/shims/bufferGlobal.js',
            'bfsGlobal': require.resolve('browserfs')
        }
    },

    module: {
        loaders: [
            // Support for .ts files
            {
                test: /\.tsx?$/,
                loader: 'ts-loader',
                include: [
                    path.resolve(__dirname, "app"),
                    path.resolve(__dirname, "node_modules"),
                    path.resolve(__dirname, "test") 
                ]
            },
            {
                test: /\.json$/,
                loader: 'json-loader'
            }
    ]
    },

    plugins: [
        // Copy static assets to the build folder
        // new CopyWebpackPlugin([{ from: 'src/assets', to: 'assets' }]),
        // Generate the index.html
        new HtmlWebpackPlugin({ template: './index.html' }),
        new webpack.ProvidePlugin({ BrowserFS: 'bfsGlobal', process: 'processGlobal', Buffer: 'bufferGlobal' })
    ]
}

Am I missing something or doing something wrong? Any and all help is much appreciated, thank you!

jvilk commented 7 years ago

Hey @elliotwesoff,

I made the conscious decision to not package type dependencies with BrowserFS. BrowserFS assumes that you have the types installed locally to your project. Perhaps I should amend this policy, now that types are in NPM. (Previously, if you depended on Node typings and if BrowserFS bundled them, your project would have two conflicting typings for Node.)

You'll need to install the @types/dropboxjs, @types/node, and @types/filesystem packages, if I remember correctly.

The complaint about ErrnoException should go away if you upgrade your Node type definitions. Let me know if this isn't the case, or if this fix needs to be backported to other Node typings.

elliotwesoff commented 7 years ago

Hey @jvilk,

Sorry, I'm pretty new to Angular/Typescript/NodeJS in general, but do I need to add those to my typings.json? I just installed them with npm install @types/dropboxjs @types/node @types/filesystem --save-dev and I'm now getting an even longer list of errors. Help?

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(102,6): error TS2300: Duplicate identifier 'BufferEncoding'.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(263,18): error TS2300: Duplicate identifier 'EventEmitter'.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(306,22): error TS2430: Interface 'ReadWriteStream' incorrectly extends interface 'ReadableStream'.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(306,22): error TS2430: Interface 'ReadWriteStream' incorrectly extends interface 'ReadableStream'.
Types of property 'pause' are incompatible.
    Type '() => ReadWriteStream' is not assignable to type '{ (): this; (): ReadableStream; }'.
    Type 'ReadWriteStream' is not assignable to type 'this'.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(564,9): error TS2502: 'BuffType' is referenced directly or indirectly in its own type annotation.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(565,9): error TS2502: 'SlowBuffType' is referenced directly or indirectly in its own type annotation.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(566,26): error TS2300: Duplicate identifier 'Buffer'.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(566,50): error TS2300: Duplicate identifier 'SlowBuffer'.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(610,5): error TS2309: An export assignment cannot be used in a module with other exported elements.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(634,22): error TS2320: Interface 'Server' cannot simultaneously extend types 'Server' and 'EventEmitter'.
Named property 'addListener' of types 'Server' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(634,22): error TS2320: Interface 'Server' cannot simultaneously extend types 'Server' and 'EventEmitter'.
Named property 'emit' of types 'Server' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(634,22): error TS2320: Interface 'Server' cannot simultaneously extend types 'Server' and 'EventEmitter'.
Named property 'on' of types 'Server' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(634,22): error TS2320: Interface 'Server' cannot simultaneously extend types 'Server' and 'EventEmitter'.
Named property 'once' of types 'Server' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(634,22): error TS2320: Interface 'Server' cannot simultaneously extend types 'Server' and 'EventEmitter'.
Named property 'prependListener' of types 'Server' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(634,22): error TS2320: Interface 'Server' cannot simultaneously extend types 'Server' and 'EventEmitter'.
Named property 'prependOnceListener' of types 'Server' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(646,22): error TS2320: Interface 'ServerResponse' cannot simultaneously extend types 'Writable' and 'EventEmitter'.
Named property 'addListener' of types 'Writable' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(646,22): error TS2320: Interface 'ServerResponse' cannot simultaneously extend types 'Writable' and 'EventEmitter'.
Named property 'emit' of types 'Writable' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(646,22): error TS2320: Interface 'ServerResponse' cannot simultaneously extend types 'Writable' and 'EventEmitter'.
Named property 'on' of types 'Writable' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(646,22): error TS2320: Interface 'ServerResponse' cannot simultaneously extend types 'Writable' and 'EventEmitter'.
Named property 'once' of types 'Writable' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(646,22): error TS2320: Interface 'ServerResponse' cannot simultaneously extend types 'Writable' and 'EventEmitter'.
Named property 'prependListener' of types 'Writable' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(646,22): error TS2320: Interface 'ServerResponse' cannot simultaneously extend types 'Writable' and 'EventEmitter'.
Named property 'prependOnceListener' of types 'Writable' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(646,22): error TS2320: Interface 'ServerResponse' cannot simultaneously extend types 'Writable' and 'EventEmitter'.
Named property 'removeListener' of types 'Writable' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(676,22): error TS2320: Interface 'ClientRequest' cannot simultaneously extend types 'Writable' and 'EventEmitter'.
Named property 'addListener' of types 'Writable' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(676,22): error TS2320: Interface 'ClientRequest' cannot simultaneously extend types 'Writable' and 'EventEmitter'.
Named property 'emit' of types 'Writable' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(676,22): error TS2320: Interface 'ClientRequest' cannot simultaneously extend types 'Writable' and 'EventEmitter'.
Named property 'on' of types 'Writable' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(676,22): error TS2320: Interface 'ClientRequest' cannot simultaneously extend types 'Writable' and 'EventEmitter'.
Named property 'once' of types 'Writable' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(676,22): error TS2320: Interface 'ClientRequest' cannot simultaneously extend types 'Writable' and 'EventEmitter'.
Named property 'prependListener' of types 'Writable' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(676,22): error TS2320: Interface 'ClientRequest' cannot simultaneously extend types 'Writable' and 'EventEmitter'.
Named property 'prependOnceListener' of types 'Writable' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(676,22): error TS2320: Interface 'ClientRequest' cannot simultaneously extend types 'Writable' and 'EventEmitter'.
Named property 'removeListener' of types 'Writable' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(702,22): error TS2320: Interface 'IncomingMessage' cannot simultaneously extend types 'Readable' and 'EventEmitter'.
Named property 'addListener' of types 'Readable' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(702,22): error TS2320: Interface 'IncomingMessage' cannot simultaneously extend types 'Readable' and 'EventEmitter'.
Named property 'emit' of types 'Readable' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(702,22): error TS2320: Interface 'IncomingMessage' cannot simultaneously extend types 'Readable' and 'EventEmitter'.
Named property 'on' of types 'Readable' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(702,22): error TS2320: Interface 'IncomingMessage' cannot simultaneously extend types 'Readable' and 'EventEmitter'.
Named property 'once' of types 'Readable' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(702,22): error TS2320: Interface 'IncomingMessage' cannot simultaneously extend types 'Readable' and 'EventEmitter'.
Named property 'prependListener' of types 'Readable' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(702,22): error TS2320: Interface 'IncomingMessage' cannot simultaneously extend types 'Readable' and 'EventEmitter'.
Named property 'prependOnceListener' of types 'Readable' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(702,22): error TS2320: Interface 'IncomingMessage' cannot simultaneously extend types 'Readable' and 'EventEmitter'.
Named property 'removeListener' of types 'Readable' and 'EventEmitter' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(756,18): error TS2300: Duplicate identifier 'Agent'.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(814,18): error TS2300: Duplicate identifier 'Worker'.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(1543,17): error TS2300: Duplicate identifier 'CompleterResult'.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(1580,18): error TS2300: Duplicate identifier 'Script'.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(2016,22): error TS2320: Interface 'Server' cannot simultaneously extend types 'EventEmitter' and 'Socket'.
Named property 'removeListener' of types 'EventEmitter' and 'Socket' are not identical.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(2528,22): error TS2451: Cannot redeclare block-scoped variable 'constants'.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(2876,18): error TS2300: Duplicate identifier 'TLSSocket'.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(3250,10): error TS2300: Duplicate identifier 'Utf8AsciiLatin1Encoding'.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(3251,10): error TS2300: Duplicate identifier 'HexBase64Latin1Encoding'.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(3252,10): error TS2300: Duplicate identifier 'Utf8AsciiBinaryEncoding'.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(3253,10): error TS2300: Duplicate identifier 'HexBase64BinaryEncoding'.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(3254,10): error TS2300: Duplicate identifier 'ECDHKeyFormat'.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(3607,5): error TS2300: Duplicate identifier 'export='.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(3690,5): error TS2300: Duplicate identifier 'export='.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(3712,18): error TS2300: Duplicate identifier 'Domain'.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(4004,5): error TS2300: Duplicate identifier 'export='.

ERROR in C:\Users\Admin\ng2-project\node_modules\@types\node\index.d.ts
(4046,5): error TS2300: Duplicate identifier 'export='.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(46,5): error TS2403: Subsequent variable declarations must have the same type.  Variable 'main' must be of type 'NodeModule', but here has type 'any'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(57,5): error TS2403: Subsequent variable declarations must have the same type.  Variable 'parent' must be of type 'NodeModule', but here has type 'any'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(58,5): error TS2403: Subsequent variable declarations must have the same type.  Variable 'children' must be of type 'NodeModule[]', but here has type 'any[]'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(78,6): error TS2300: Duplicate identifier 'BufferEncoding'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(227,9): error TS2403: Subsequent variable declarations must have the same type.  Variable 'errno' must be of type 'number', but here has type 'string'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(234,18): error TS2300: Duplicate identifier 'EventEmitter'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(364,9): error TS2403: Subsequent variable declarations must have the same type.  Variable 'platform' must be of type 'Platform', but here has type 'string'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(520,26): error TS2300: Duplicate identifier 'Buffer'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(520,50): error TS2300: Duplicate identifier 'SlowBuffer'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(651,9): error TS2403: Subsequent variable declarations must have the same type.  Variable 'httpVersionMajor' must be of type 'number', but here has type 'string'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(652,9): error TS2403: Subsequent variable declarations must have the same type.  Variable 'httpVersionMinor' must be of type 'number', but here has type 'string'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(653,9): error TS2403: Subsequent variable declarations must have the same type.  Variable 'connection' must be of type 'Socket', but here has type 'any'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(703,18): error TS2300: Duplicate identifier 'Agent'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(745,9): error TS2403: Subsequent variable declarations must have the same type.  Variable 'addressType' must be of type 'number | "udp4" | "udp6"', but here has type 'string'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(748,18): error TS2300: Duplicate identifier 'Worker'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(1141,22): error TS2300: Duplicate identifier 'CompleterResult'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(1181,18): error TS2300: Duplicate identifier 'Script'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(1848,18): error TS2451: Cannot redeclare block-scoped variable 'constants'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(2076,18): error TS2300: Duplicate identifier 'TLSSocket'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(2308,10): error TS2300: Duplicate identifier 'Utf8AsciiLatin1Encoding'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(2309,10): error TS2300: Duplicate identifier 'HexBase64Latin1Encoding'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(2310,10): error TS2300: Duplicate identifier 'Utf8AsciiBinaryEncoding'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(2311,10): error TS2300: Duplicate identifier 'HexBase64BinaryEncoding'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(2312,10): error TS2300: Duplicate identifier 'ECDHKeyFormat'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(2449,22): error TS2420: Class 'Readable' incorrectly implements interface 'ReadableStream'.
Types of property 'setEncoding' are incompatible.
    Type '(encoding: string) => void' is not assignable to type '{ (encoding: string): this; (encoding: string): void; }'.
    Type 'void' is not assignable to type 'this'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(2490,22): error TS2420: Class 'Duplex' incorrectly implements interface 'ReadWriteStream'.
Types of property 'pause' are incompatible.
    Type '() => Duplex' is not assignable to type '() => ReadWriteStream'.
    Type 'Duplex' is not assignable to type 'ReadWriteStream'.
        Types of property 'setEncoding' are incompatible.
        Type '(encoding: string) => void' is not assignable to type '{ (encoding: string): ReadWriteStream; (encoding: string): void; }'.
            Type 'void' is not assignable to type 'ReadWriteStream'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(2511,22): error TS2420: Class 'Transform' incorrectly implements interface 'ReadWriteStream'.
Types of property 'pause' are incompatible.
    Type '() => Transform' is not assignable to type '() => ReadWriteStream'.
    Type 'Transform' is not assignable to type 'ReadWriteStream'.
        Types of property 'setEncoding' are incompatible.
        Type '(encoding: string) => void' is not assignable to type '{ (encoding: string): ReadWriteStream; (encoding: string): void; }'.
            Type 'void' is not assignable to type 'ReadWriteStream'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(2536,5): error TS2300: Duplicate identifier 'export='.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(2619,5): error TS2300: Duplicate identifier 'export='.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(2641,18): error TS2300: Duplicate identifier 'Domain'.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(2933,5): error TS2300: Duplicate identifier 'export='.

ERROR in C:\Users\Admin\ng2-project\typings\globals\node\index.d.ts
(2959,5): error TS2300: Duplicate identifier 'export='
elliotwesoff commented 7 years ago

After some googling and a little reading I've come to the conclusion that it's most likely not an issue with BrowserFS but rather with my typings.json, tsconfig.json, or some other unseen magical force in my project. I'll keep digging around but if you have anything helpful for me it would be much appreciated. Thanks!

elliotwesoff commented 7 years ago

To anyone who may come across this issue in the future: I resolved all error messages by removing the node and dropboxjs folders from /typings/globals/

I also removed the entries:

/// <reference path="globals/dropboxjs/index.d.ts" /> /// <reference path="globals/node/index.d.ts" />

from /typings/index.d.ts

Good luck!

jvilk commented 7 years ago

typings.json is the previous way to manage TypeScript typings using the typings tool. Many folks now use the @types NPM packages. AFAIK, typings is still supported, so what you are doing isn't wrong. I just misguided you with the new way of doing things.

Best of luck on your project!