angular-electron icon indicating copy to clipboard operation
angular-electron copied to clipboard

File 'typings/browser.d.ts' not found.

Open Thomas-23 opened this issue 9 years ago • 13 comments

log below:

E:\angular-electron>npm run setup-demo

> @angular2/[email protected] setup-demo E:\angular-electron
> npm install --no-optional [email protected] es6-promise@^3.1.2 es6-shim@0
.35.0 [email protected] [email protected] zone.js@^0.6.6

@angular2/[email protected] E:\angular-electron
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]


E:\angular-electron>npm run start

> @angular2/[email protected] start E:\angular-electron
> npm run demo


> @angular2/[email protected] demo E:\angular-electron
> npm run build && npm run build_demo && electron ./demo


> @angular2/[email protected] build E:\angular-electron
> npm run clean && tsc


> @angular2/[email protected] clean E:\angular-electron
> rimraf dist

error TS6053: File 'typings/browser.d.ts' not found.

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\long\\AppData\\R
oaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.3.1
npm ERR! npm  v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! @angular2/[email protected] build: `npm run clean && tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @angular2/[email protected] build script 'npm run clean && t
sc'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the @angular2/electron pa
ckage,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run clean && tsc
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs @angular2/electron
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls @angular2/electron
npm ERR! There is likely additional logging output above.

the error Prompt browser.d.ts not found, how do i solve this problem.

Thomas-23 avatar Aug 12 '16 13:08 Thomas-23

same problem +1

stableShip avatar Aug 24 '16 14:08 stableShip

Did you run npm run setup as well?

Usually this should install typings. There was a discussion about removing browser.d.ts in typings, but I did not follow along. However, I just tried running a fresh copy and it worked with running the following commands:

npm run setup npm run setup-demo npm start

PerfectPixel avatar Aug 24 '16 18:08 PerfectPixel

get it. now typings install didnt create browser.d.ts , now create index.d.ts instead of browser.d.ts


fix it by:

change package.json build_demo to tsc typings/index.d.ts demo/main.ts demo/app_ui.ts --module commonjs -t es5 --experimentalDecorators --emitDecoratorMetadata

change tsconfig.json files typings/broswer.d.ts to typings/index.d.ts

demo

stableShip avatar Aug 25 '16 02:08 stableShip

Thanks in front of two of the answer, i'll try

Thomas-23 avatar Aug 25 '16 02:08 Thomas-23

I have the same issue but my index.d.ts file is completely empty! and therefor (I guess) it doesn't work at all

danielnieto avatar Nov 25 '16 06:11 danielnieto

I have the same issue but my index.d.ts file is completely empty! and therefor (I guess) it doesn't work at all.

me too. 😨

➜ angular-electron git:(master) ✗ tsc typings/index.d.ts demo/main.ts demo/app_ui.ts --module commonjs -t es5 --experimentalDecorators --emitDecoratorMetadata node_modules/.2.0.0-beta.12@angular2/src/common/directives/ng_class.d.ts(72,35): error TS2304: Cannot find name 'Set'. node_modules/.2.0.0-beta.12@angular2/src/common/pipes/async_pipe.d.ts(25,38): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/compiler/style_compiler.d.ts(11,65): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/compiler/template_compiler.d.ts(34,70): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/compiler/template_compiler.d.ts(35,46): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/compiler/template_normalizer.d.ts(10,95): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/compiler/template_parser.d.ts(30,12): error TS2304: Cannot find name 'Set'. node_modules/.2.0.0-beta.12@angular2/src/compiler/xhr.d.ts(6,23): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/core/application_ref.d.ts(83,60): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/core/application_ref.d.ts(83,146): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/core/application_ref.d.ts(96,51): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/core/application_ref.d.ts(96,147): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/core/application_ref.d.ts(133,90): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/core/application_ref.d.ts(171,81): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/core/change_detection/differs/default_keyvalue_differ.d.ts(23,15): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/core/change_detection/differs/default_keyvalue_differ.d.ts(25,16): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/core/change_detection/parser/locals.d.ts(3,14): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/core/change_detection/parser/locals.d.ts(4,42): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/core/debug/debug_node.d.ts(14,13): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/core/debug/debug_node.d.ts(24,17): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/core/debug/debug_node.d.ts(25,17): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/core/di/provider.d.ts(436,103): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/core/di/provider.d.ts(436,135): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/core/linker/compiler.d.ts(12,50): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/core/linker/compiler.d.ts(16,41): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/core/linker/dynamic_component_loader.d.ts(108,136): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/core/linker/dynamic_component_loader.d.ts(156,150): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/core/linker/dynamic_component_loader.d.ts(197,128): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/core/linker/dynamic_component_loader.d.ts(203,127): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/core/linker/dynamic_component_loader.d.ts(204,141): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/core/linker/dynamic_component_loader.d.ts(205,119): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/core/render/api.d.ts(13,13): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/core/render/api.d.ts(14,84): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/facade/async.d.ts(27,33): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/facade/async.d.ts(28,45): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/facade/collection.d.ts(1,25): error TS2304: Cannot find name 'MapConstructor'. node_modules/.2.0.0-beta.12@angular2/src/facade/collection.d.ts(2,25): error TS2304: Cannot find name 'SetConstructor'. node_modules/.2.0.0-beta.12@angular2/src/facade/collection.d.ts(4,27): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/facade/collection.d.ts(4,39): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/facade/collection.d.ts(7,9): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/facade/collection.d.ts(8,30): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/facade/collection.d.ts(11,43): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/facade/collection.d.ts(12,27): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/facade/collection.d.ts(14,23): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/facade/collection.d.ts(15,25): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/facade/collection.d.ts(100,41): error TS2304: Cannot find name 'Set'. node_modules/.2.0.0-beta.12@angular2/src/facade/collection.d.ts(101,22): error TS2304: Cannot find name 'Set'. node_modules/.2.0.0-beta.12@angular2/src/facade/collection.d.ts(102,25): error TS2304: Cannot find name 'Set'. node_modules/.2.0.0-beta.12@angular2/src/facade/lang.d.ts(4,17): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/facade/lang.d.ts(5,17): error TS2304: Cannot find name 'Set'. node_modules/.2.0.0-beta.12@angular2/src/facade/lang.d.ts(70,59): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/facade/promise.d.ts(2,14): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/facade/promise.d.ts(8,32): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/facade/promise.d.ts(9,38): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/facade/promise.d.ts(10,35): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/facade/promise.d.ts(10,93): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/facade/promise.d.ts(11,34): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/facade/promise.d.ts(11,50): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/facade/promise.d.ts(12,32): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/facade/promise.d.ts(12,149): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/facade/promise.d.ts(13,43): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/web_workers/shared/client_message_broker.d.ts(20,65): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/web_workers/shared/client_message_broker.d.ts(28,56): error TS2304: Cannot find name 'Promise'. node_modules/.2.0.0-beta.12@angular2/src/web_workers/shared/serializer.d.ts(9,22): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/web_workers/shared/serializer.d.ts(12,34): error TS2304: Cannot find name 'Map'. node_modules/.2.0.0-beta.12@angular2/src/web_workers/shared/service_message_broker.d.ts(30,84): error TS2304: Cannot find name 'Promise'. node_modules/.5.0.0-beta.2@rxjs/CoreOperators.d.ts(35,67): error TS2304: Cannot find name 'Promise'. node_modules/.5.0.0-beta.2@rxjs/CoreOperators.d.ts(50,66): error TS2304: Cannot find name 'Promise'. node_modules/.5.0.0-beta.2@rxjs/CoreOperators.d.ts(89,67): error TS2304: Cannot find name 'Promise'. node_modules/.5.0.0-beta.2@rxjs/CoreOperators.d.ts(94,38): error TS2304: Cannot find name 'Promise'. node_modules/.5.0.0-beta.2@rxjs/CoreOperators.d.ts(94,50): error TS2304: Cannot find name 'Promise'. node_modules/.5.0.0-beta.2@rxjs/Observable.d.ts(46,62): error TS2304: Cannot find name 'Promise'. node_modules/.5.0.0-beta.2@rxjs/Observable.d.ts(47,42): error TS2304: Cannot find name 'Iterator'. node_modules/.5.0.0-beta.2@rxjs/Observable.d.ts(103,74): error TS2304: Cannot find name 'Promise'. node_modules/.5.0.0-beta.2@rxjs/Observable.d.ts(103,84): error TS2304: Cannot find name 'Promise'. node_modules/.5.0.0-beta.2@rxjs/Observable.d.ts(143,66): error TS2304: Cannot find name 'Promise'. node_modules/.5.0.0-beta.2@rxjs/Observable.d.ts(158,65): error TS2304: Cannot find name 'Promise'. node_modules/.5.0.0-beta.2@rxjs/Observable.d.ts(201,66): error TS2304: Cannot find name 'Promise'. node_modules/.5.0.0-beta.2@rxjs/Observable.d.ts(206,38): error TS2304: Cannot find name 'Promise'. node_modules/.5.0.0-beta.2@rxjs/Observable.d.ts(206,50): error TS2304: Cannot find name 'Promise'. node_modules/.5.0.0-beta.2@rxjs/observable/ForkJoinObservable.d.ts(6,50): error TS2304: Cannot find name 'Promise'. node_modules/.5.0.0-beta.2@rxjs/observable/ForkJoinObservable.d.ts(7,58): error TS2304: Cannot find name 'Promise'. node_modules/.5.0.0-beta.2@rxjs/observable/FromObservable.d.ts(7,38): error TS2304: Cannot find name 'Promise'. node_modules/.5.0.0-beta.2@rxjs/observable/FromObservable.d.ts(7,51): error TS2304: Cannot find name 'Iterator'. node_modules/.5.0.0-beta.2@rxjs/observable/PromiseObservable.d.ts(9,31): error TS2304: Cannot find name 'Promise'. node_modules/.5.0.0-beta.2@rxjs/observable/PromiseObservable.d.ts(10,26): error TS2304: Cannot find name 'Promise'. ➜ angular-electron git:(master) ✗

felixyin avatar Dec 25 '16 03:12 felixyin

I am running to the same issue :(

xenthil avatar Dec 30 '16 09:12 xenthil

Renaming the attribute ambientDependencies to globalDependencies in the typings.json file, solved the issue for me. don't forget to follow @stableShip instructions too.

jbgraug avatar Jan 27 '17 20:01 jbgraug

Solution : 1) : replace the 'build_demo' value in package.json by this : "tsc typings/index.d.ts demo/main.ts demo/app_ui.ts --module commonjs -t es5 --experimentalDecorators --emitDecoratorMetadata" 2) In the tsconfig.json file, replace typings/broswer.d.ts by typings/index.d.ts 3) In the typings.json file, replace ambientDependencies by globalDependencies 4) Execute this command lines : npm run setup npm run setup-demo npm start

It will work :)

AdrienTorris avatar Mar 09 '17 13:03 AdrienTorris

same issue here. none of the solutions helped. have someone found a real answer for this ?

mehranagh20 avatar Apr 22 '17 04:04 mehranagh20

this is still an issue for me

okonon avatar Sep 21 '17 15:09 okonon

npm install typings --save --global solved the issue for me.

smshahinulislam avatar Feb 04 '19 17:02 smshahinulislam

  1. Did all of the above, none worked.
  2. index.d.ts still empty.
  3. npm start hopelessly fails.

varogonz95 avatar Jun 28 '19 03:06 varogonz95