thoughtstem / Web-Modeler

A web-based 3D modeler for voxel games.
1 stars 0 forks source link

npm run build raises TS2300: Duplicate identifier error #3

Open mtfuji25 opened 3 years ago

mtfuji25 commented 3 years ago

tsc public/javascripts/entry.ts --module amd

node_modules/typescript/lib/lib.d.ts(4238,5): error TS2300: Duplicate identifier 'fftSize'. node_modules/typescript/lib/lib.d.ts(4239,5): error TS2300: Duplicate identifier 'frequencyBinCount'. node_modules/typescript/lib/lib.d.ts(4240,5): error TS2300: Duplicate identifier 'maxDecibels'. node_modules/typescript/lib/lib.d.ts(4241,5): error TS2300: Duplicate identifier 'minDecibels'. node_modules/typescript/lib/lib.d.ts(4242,5): error TS2300: Duplicate identifier 'smoothingTimeConstant'. node_modules/typescript/lib/lib.d.ts(4329,5): error TS2300: Duplicate identifier 'duration'. node_modules/typescript/lib/lib.d.ts(4330,5): error TS2300: Duplicate identifier 'length'. node_modules/typescript/lib/lib.d.ts(4331,5): error TS2300: Duplicate identifier 'numberOfChannels'. node_modules/typescript/lib/lib.d.ts(4332,5): error TS2300: Duplicate identifier 'sampleRate'. node_modules/typescript/lib/lib.d.ts(4342,5): error TS2300: Duplicate identifier 'buffer'. node_modules/typescript/lib/lib.d.ts(4343,5): error TS2300: Duplicate identifier 'loop'. node_modules/typescript/lib/lib.d.ts(4344,5): error TS2300: Duplicate identifier 'loopEnd'. node_modules/typescript/lib/lib.d.ts(4345,5): error TS2300: Duplicate identifier 'loopStart'. node_modules/typescript/lib/lib.d.ts(4346,5): error TS2300: Duplicate identifier 'onended'. node_modules/typescript/lib/lib.d.ts(4347,5): error TS2300: Duplicate identifier 'playbackRate'. node_modules/typescript/lib/lib.d.ts(4360,5): error TS2300: Duplicate identifier 'currentTime'. node_modules/typescript/lib/lib.d.ts(4361,5): error TS2300: Duplicate identifier 'destination'. node_modules/typescript/lib/lib.d.ts(4362,5): error TS2300: Duplicate identifier 'listener'. node_modules/typescript/lib/lib.d.ts(4363,5): error TS2300: Duplicate identifier 'sampleRate'. node_modules/typescript/lib/lib.d.ts(4400,5): error TS2300: Duplicate identifier 'dopplerFactor'. node_modules/typescript/lib/lib.d.ts(4401,5): error TS2300: Duplicate identifier 'speedOfSound'. node_modules/typescript/lib/lib.d.ts(4413,5): error TS2300: Duplicate identifier 'channelCount'. node_modules/typescript/lib/lib.d.ts(4414,5): error TS2300: Duplicate identifier 'channelCountMode'. node_modules/typescript/lib/lib.d.ts(4415,5): error TS2300: Duplicate identifier 'channelInterpretation'. node_modules/typescript/lib/lib.d.ts(4416,5): error TS2300: Duplicate identifier 'context'. node_modules/typescript/lib/lib.d.ts(4417,5): error TS2300: Duplicate identifier 'numberOfInputs'. node_modules/typescript/lib/lib.d.ts(4418,5): error TS2300: Duplicate identifier 'numberOfOutputs'. node_modules/typescript/lib/lib.d.ts(4429,5): error TS2300: Duplicate identifier 'defaultValue'. node_modules/typescript/lib/lib.d.ts(4430,5): error TS2300: Duplicate identifier 'value'. node_modules/typescript/lib/lib.d.ts(4445,5): error TS2300: Duplicate identifier 'inputBuffer'. node_modules/typescript/lib/lib.d.ts(4446,5): error TS2300: Duplicate identifier 'outputBuffer'. node_modules/typescript/lib/lib.d.ts(4447,5): error TS2300: Duplicate identifier 'playbackTime'. node_modules/typescript/lib/lib.d.ts(4507,5): error TS2300: Duplicate identifier 'Q'. node_modules/typescript/lib/lib.d.ts(4509,5): error TS2300: Duplicate identifier 'frequency'. node_modules/typescript/lib/lib.d.ts(4510,5): error TS2300: Duplicate identifier 'gain'. node_modules/typescript/lib/lib.d.ts(4511,5): error TS2300: Duplicate identifier 'type'. node_modules/typescript/lib/lib.d.ts(5308,5): error TS2300: Duplicate identifier 'buffer'. node_modules/typescript/lib/lib.d.ts(5309,5): error TS2300: Duplicate identifier 'normalize'. node_modules/typescript/lib/lib.d.ts(5581,5): error TS2300: Duplicate identifier 'delayTime'. node_modules/typescript/lib/lib.d.ts(6753,5): error TS2300: Duplicate identifier 'attack'. node_modules/typescript/lib/lib.d.ts(6754,5): error TS2300: Duplicate identifier 'knee'. node_modules/typescript/lib/lib.d.ts(6755,5): error TS2300: Duplicate identifier 'ratio'. node_modules/typescript/lib/lib.d.ts(6756,5): error TS2300: Duplicate identifier 'reduction'. node_modules/typescript/lib/lib.d.ts(6757,5): error TS2300: Duplicate identifier 'release'. node_modules/typescript/lib/lib.d.ts(6758,5): error TS2300: Duplicate identifier 'threshold'. node_modules/typescript/lib/lib.d.ts(7189,5): error TS2300: Duplicate identifier 'gain'. node_modules/typescript/lib/lib.d.ts(12090,5): error TS2300: Duplicate identifier 'renderedBuffer'. node_modules/typescript/lib/lib.d.ts(12099,5): error TS2300: Duplicate identifier 'oncomplete'. node_modules/typescript/lib/lib.d.ts(12111,5): error TS2300: Duplicate identifier 'detune'. node_modules/typescript/lib/lib.d.ts(12112,5): error TS2300: Duplicate identifier 'frequency'. node_modules/typescript/lib/lib.d.ts(12113,5): error TS2300: Duplicate identifier 'onended'. node_modules/typescript/lib/lib.d.ts(12114,5): error TS2300: Duplicate identifier 'type'. node_modules/typescript/lib/lib.d.ts(12137,5): error TS2300: Duplicate identifier 'coneInnerAngle'. node_modules/typescript/lib/lib.d.ts(12138,5): error TS2300: Duplicate identifier 'coneOuterAngle'. node_modules/typescript/lib/lib.d.ts(12139,5): error TS2300: Duplicate identifier 'coneOuterGain'. node_modules/typescript/lib/lib.d.ts(12140,5): error TS2300: Duplicate identifier 'distanceModel'. node_modules/typescript/lib/lib.d.ts(12141,5): error TS2300: Duplicate identifier 'maxDistance'. node_modules/typescript/lib/lib.d.ts(12142,5): error TS2300: Duplicate identifier 'panningModel'. node_modules/typescript/lib/lib.d.ts(12143,5): error TS2300: Duplicate identifier 'refDistance'. node_modules/typescript/lib/lib.d.ts(12144,5): error TS2300: Duplicate identifier 'rolloffFactor'. node_modules/typescript/lib/lib.d.ts(14319,5): error TS2300: Duplicate identifier 'bufferSize'. node_modules/typescript/lib/lib.d.ts(14320,5): error TS2300: Duplicate identifier 'onaudioprocess'. node_modules/typescript/lib/lib.d.ts(14911,5): error TS2300: Duplicate identifier 'curve'. node_modules/typescript/lib/lib.d.ts(14912,5): error TS2300: Duplicate identifier 'oversample'. public/javascripts/typings/webaudioapi/waa.d.ts(19,5): error TS2300: Duplicate identifier 'destination'. public/javascripts/typings/webaudioapi/waa.d.ts(24,5): error TS2300: Duplicate identifier 'sampleRate'. public/javascripts/typings/webaudioapi/waa.d.ts(29,5): error TS2300: Duplicate identifier 'currentTime'. public/javascripts/typings/webaudioapi/waa.d.ts(34,5): error TS2300: Duplicate identifier 'listener'. public/javascripts/typings/webaudioapi/waa.d.ts(169,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'AudioContext' must be of type '{ new (): AudioContext; prototype: AudioContext; }', but here has type 'new () => AudioContext'. public/javascripts/typings/webaudioapi/waa.d.ts(184,5): error TS2300: Duplicate identifier 'oncomplete'. public/javascripts/typings/webaudioapi/waa.d.ts(187,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'OfflineAudioContext' must be of type '{ new (numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext; protot...', but here has type 'new (numberOfChannels: number, length: number, sampleRate: number) => OfflineAudioContext'. public/javascripts/typings/webaudioapi/waa.d.ts(199,5): error TS2300: Duplicate identifier 'renderedBuffer'. public/javascripts/typings/webaudioapi/waa.d.ts(284,5): error TS2300: Duplicate identifier 'context'. public/javascripts/typings/webaudioapi/waa.d.ts(289,5): error TS2300: Duplicate identifier 'numberOfInputs'. public/javascripts/typings/webaudioapi/waa.d.ts(294,5): error TS2300: Duplicate identifier 'numberOfOutputs'. public/javascripts/typings/webaudioapi/waa.d.ts(299,5): error TS2300: Duplicate identifier 'channelCount'. public/javascripts/typings/webaudioapi/waa.d.ts(306,5): error TS2300: Duplicate identifier 'channelCountMode'. public/javascripts/typings/webaudioapi/waa.d.ts(313,5): error TS2300: Duplicate identifier 'channelInterpretation'. public/javascripts/typings/webaudioapi/waa.d.ts(361,5): error TS2300: Duplicate identifier 'value'. public/javascripts/typings/webaudioapi/waa.d.ts(376,5): error TS2300: Duplicate identifier 'defaultValue'. public/javascripts/typings/webaudioapi/waa.d.ts(483,5): error TS2300: Duplicate identifier 'gain'. public/javascripts/typings/webaudioapi/waa.d.ts(498,5): error TS2300: Duplicate identifier 'delayTime'. public/javascripts/typings/webaudioapi/waa.d.ts(511,5): error TS2300: Duplicate identifier 'sampleRate'. public/javascripts/typings/webaudioapi/waa.d.ts(517,5): error TS2300: Duplicate identifier 'length'. public/javascripts/typings/webaudioapi/waa.d.ts(523,5): error TS2300: Duplicate identifier 'duration'. public/javascripts/typings/webaudioapi/waa.d.ts(529,5): error TS2300: Duplicate identifier 'numberOfChannels'. public/javascripts/typings/webaudioapi/waa.d.ts(551,5): error TS2300: Duplicate identifier 'buffer'. public/javascripts/typings/webaudioapi/waa.d.ts(556,5): error TS2300: Duplicate identifier 'playbackRate'. public/javascripts/typings/webaudioapi/waa.d.ts(561,5): error TS2300: Duplicate identifier 'loop'. public/javascripts/typings/webaudioapi/waa.d.ts(566,5): error TS2300: Duplicate identifier 'loopStart'. public/javascripts/typings/webaudioapi/waa.d.ts(571,5): error TS2300: Duplicate identifier 'loopEnd'. public/javascripts/typings/webaudioapi/waa.d.ts(576,5): error TS2300: Duplicate identifier 'onended'. public/javascripts/typings/webaudioapi/waa.d.ts(624,5): error TS2300: Duplicate identifier 'onaudioprocess'. public/javascripts/typings/webaudioapi/waa.d.ts(629,5): error TS2300: Duplicate identifier 'bufferSize'. public/javascripts/typings/webaudioapi/waa.d.ts(641,5): error TS2300: Duplicate identifier 'playbackTime'. public/javascripts/typings/webaudioapi/waa.d.ts(646,5): error TS2300: Duplicate identifier 'inputBuffer'. public/javascripts/typings/webaudioapi/waa.d.ts(651,5): error TS2300: Duplicate identifier 'outputBuffer'. public/javascripts/typings/webaudioapi/waa.d.ts(700,5): error TS2300: Duplicate identifier 'panningModel'. public/javascripts/typings/webaudioapi/waa.d.ts(738,5): error TS2300: Duplicate identifier 'distanceModel'. public/javascripts/typings/webaudioapi/waa.d.ts(743,5): error TS2300: Duplicate identifier 'refDistance'. public/javascripts/typings/webaudioapi/waa.d.ts(748,5): error TS2300: Duplicate identifier 'maxDistance'. public/javascripts/typings/webaudioapi/waa.d.ts(753,5): error TS2300: Duplicate identifier 'rolloffFactor'. public/javascripts/typings/webaudioapi/waa.d.ts(758,5): error TS2300: Duplicate identifier 'coneInnerAngle'. public/javascripts/typings/webaudioapi/waa.d.ts(763,5): error TS2300: Duplicate identifier 'coneOuterAngle'. public/javascripts/typings/webaudioapi/waa.d.ts(768,5): error TS2300: Duplicate identifier 'coneOuterGain'. public/javascripts/typings/webaudioapi/waa.d.ts(778,5): error TS2300: Duplicate identifier 'dopplerFactor'. public/javascripts/typings/webaudioapi/waa.d.ts(783,5): error TS2300: Duplicate identifier 'speedOfSound'. public/javascripts/typings/webaudioapi/waa.d.ts(829,5): error TS2300: Duplicate identifier 'buffer'. public/javascripts/typings/webaudioapi/waa.d.ts(834,5): error TS2300: Duplicate identifier 'normalize'. public/javascripts/typings/webaudioapi/waa.d.ts(865,5): error TS2300: Duplicate identifier 'fftSize'. public/javascripts/typings/webaudioapi/waa.d.ts(870,5): error TS2300: Duplicate identifier 'frequencyBinCount'. public/javascripts/typings/webaudioapi/waa.d.ts(875,5): error TS2300: Duplicate identifier 'minDecibels'. public/javascripts/typings/webaudioapi/waa.d.ts(880,5): error TS2300: Duplicate identifier 'maxDecibels'. public/javascripts/typings/webaudioapi/waa.d.ts(885,5): error TS2300: Duplicate identifier 'smoothingTimeConstant'. public/javascripts/typings/webaudioapi/waa.d.ts(918,5): error TS2300: Duplicate identifier 'threshold'. public/javascripts/typings/webaudioapi/waa.d.ts(923,5): error TS2300: Duplicate identifier 'knee'. public/javascripts/typings/webaudioapi/waa.d.ts(928,5): error TS2300: Duplicate identifier 'ratio'. public/javascripts/typings/webaudioapi/waa.d.ts(933,5): error TS2300: Duplicate identifier 'reduction'. public/javascripts/typings/webaudioapi/waa.d.ts(938,5): error TS2300: Duplicate identifier 'attack'. public/javascripts/typings/webaudioapi/waa.d.ts(943,5): error TS2300: Duplicate identifier 'release'. public/javascripts/typings/webaudioapi/waa.d.ts(1066,5): error TS2300: Duplicate identifier 'type'. public/javascripts/typings/webaudioapi/waa.d.ts(1067,5): error TS2300: Duplicate identifier 'frequency'. public/javascripts/typings/webaudioapi/waa.d.ts(1068,5): error TS2300: Duplicate identifier 'Q'. public/javascripts/typings/webaudioapi/waa.d.ts(1069,5): error TS2300: Duplicate identifier 'gain'. public/javascripts/typings/webaudioapi/waa.d.ts(1098,5): error TS2300: Duplicate identifier 'curve'. public/javascripts/typings/webaudioapi/waa.d.ts(1111,5): error TS2300: Duplicate identifier 'oversample'. public/javascripts/typings/webaudioapi/waa.d.ts(1146,9): error TS2300: Duplicate identifier 'type'. public/javascripts/typings/webaudioapi/waa.d.ts(1152,5): error TS2300: Duplicate identifier 'frequency'. public/javascripts/typings/webaudioapi/waa.d.ts(1157,5): error TS2300: Duplicate identifier 'detune'. public/javascripts/typings/webaudioapi/waa.d.ts(1177,5): error TS2300: Duplicate identifier 'onended'.

mtfuji25 commented 3 years ago

This is package.json file

{
  "name": "web-modeler",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "build": "tsc public/javascripts/entry.ts --module amd",
    "start": "npm run build && node ./bin/www",
    "watch": "watchify public/javascripts/entry.ts -o public/javascripts/bundle.js -dv",
    "prepublish": "npm run build"
  },
  "dependencies": {
    "body-parser": "^1.12.4",
    "cookie-parser": "^1.3.5",
    "debug": "^2.2.0",
    "express": "^4.12.4",
    "morgan": "^1.5.3",
    "serve-favicon": "^2.2.1",
    "typescript": "^1.8.10"
  },
  "devDependencies": {
    "watchify": "^3.11.1"
  }
}
mtfuji25 commented 3 years ago

This is tsconfig.json

{
  "compilerOptions": {
    /* Visit https://aka.ms/tsconfig.json to read more about this file */

    /* Basic Options */
    // "incremental": true,                         /* Enable incremental compilation */
    "target": "es5",                                /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
    "module": "commonjs",                           /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
    // "lib": [],                                   /* Specify library files to be included in the compilation. */
    // "allowJs": true,                             /* Allow javascript files to be compiled. */
    // "checkJs": true,                             /* Report errors in .js files. */
    // "jsx": "preserve",                           /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
    // "declaration": true,                         /* Generates corresponding '.d.ts' file. */
    // "declarationMap": true,                      /* Generates a sourcemap for each corresponding '.d.ts' file. */
    // "sourceMap": true,                           /* Generates corresponding '.map' file. */
    // "outFile": "./",                             /* Concatenate and emit output to single file. */
    // "outDir": "./",                              /* Redirect output structure to the directory. */
    // "rootDir": "./",                             /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
    // "composite": true,                           /* Enable project compilation */
    // "tsBuildInfoFile": "./",                     /* Specify file to store incremental compilation information */
    // "removeComments": true,                      /* Do not emit comments to output. */
    // "noEmit": true,                              /* Do not emit outputs. */
    // "importHelpers": true,                       /* Import emit helpers from 'tslib'. */
    // "downlevelIteration": true,                  /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
    // "isolatedModules": true,                     /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */

    /* Strict Type-Checking Options */
    "strict": true,                                 /* Enable all strict type-checking options. */
    "noImplicitAny": false,                       /* Raise error on expressions and declarations with an implied 'any' type. */
    "strictNullChecks": false,                    /* Enable strict null checks. */
    // "strictFunctionTypes": true,                 /* Enable strict checking of function types. */
    // "strictBindCallApply": true,                 /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
    // "strictPropertyInitialization": true,        /* Enable strict checking of property initialization in classes. */
    "noImplicitThis": false,                      /* Raise error on 'this' expressions with an implied 'any' type. */
    // "alwaysStrict": true,                        /* Parse in strict mode and emit "use strict" for each source file. */

    /* Additional Checks */
    // "noUnusedLocals": true,                      /* Report errors on unused locals. */
    // "noUnusedParameters": true,                  /* Report errors on unused parameters. */
    // "noImplicitReturns": true,                   /* Report error when not all code paths in function return a value. */
    // "noFallthroughCasesInSwitch": true,          /* Report errors for fallthrough cases in switch statement. */
    // "noUncheckedIndexedAccess": true,            /* Include 'undefined' in index signature results */
    // "noPropertyAccessFromIndexSignature": true,  /* Require undeclared properties from index signatures to use element accesses. */

    /* Module Resolution Options */
    // "moduleResolution": "node",                  /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
    // "baseUrl": "./",                             /* Base directory to resolve non-absolute module names. */
    // "paths": {},                                 /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
    // "rootDirs": [],                              /* List of root folders whose combined content represents the structure of the project at runtime. */
    // "typeRoots": [],                             /* List of folders to include type definitions from. */
    // "types": [],                                 /* Type declaration files to be included in compilation. */
    // "allowSyntheticDefaultImports": true,        /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
    "esModuleInterop": true,                        /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
    // "preserveSymlinks": true,                    /* Do not resolve the real path of symlinks. */
    // "allowUmdGlobalAccess": true,                /* Allow accessing UMD globals from modules. */

    /* Source Map Options */
    // "sourceRoot": "",                            /* Specify the location where debugger should locate TypeScript files instead of source locations. */
    // "mapRoot": "",                               /* Specify the location where debugger should locate map files instead of generated locations. */
    // "inlineSourceMap": true,                     /* Emit a single file with source maps instead of having a separate file. */
    // "inlineSources": true,                       /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */

    /* Experimental Options */
    // "experimentalDecorators": true,              /* Enables experimental support for ES7 decorators. */
    // "emitDecoratorMetadata": true,               /* Enables experimental support for emitting type metadata for decorators. */

    /* Advanced Options */
    "skipLibCheck": true,                           /* Skip type checking of declaration files. */
    "forceConsistentCasingInFileNames": true        /* Disallow inconsistently-cased references to the same file. */
  }
}
mtfuji25 commented 3 years ago

I would suggest fixing these lines:

public\javascripts\input.ts file image