Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

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

Open
Thomas-23 opened this issue Aug 12, 2016 · 13 comments · May be fixed by #26
Open

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

Thomas-23 opened this issue Aug 12, 2016 · 13 comments · May be fixed by #26

Comments

@Thomas-23
Copy link

log below:

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

> @angular2/electron@1.0.0 setup-demo E:\angular-electron
> npm install --no-optional angular2@2.0.0-beta.12 es6-promise@^3.1.2 es6-shim@0
.35.0 reflect-metadata@0.1.2 rxjs@5.0.0-beta.2 zone.js@^0.6.6

@angular2/electron@1.0.0 E:\angular-electron
+-- angular2@2.0.0-beta.12
+-- es6-promise@3.1.2
+-- es6-shim@0.35.0
+-- reflect-metadata@0.1.2
+-- rxjs@5.0.0-beta.2
`-- zone.js@0.6.6


E:\angular-electron>npm run start

> @angular2/electron@1.0.0 start E:\angular-electron
> npm run demo


> @angular2/electron@1.0.0 demo E:\angular-electron
> npm run build && npm run build_demo && electron ./demo


> @angular2/electron@1.0.0 build E:\angular-electron
> npm run clean && tsc


> @angular2/electron@1.0.0 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/electron@1.0.0 build: `npm run clean && tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @angular2/electron@1.0.0 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.

@stableShip
Copy link

same problem +1

@PerfectPixel
Copy link

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

@stableShip
Copy link

stableShip commented Aug 25, 2016

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

@Thomas-23
Copy link
Author

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

@danielnieto
Copy link

danielnieto commented Nov 25, 2016

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

@xenthil
Copy link

xenthil commented Dec 30, 2016

I am running to the same issue :(

@jbgraug
Copy link

jbgraug commented Jan 27, 2017

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

@AdrienTorris
Copy link

AdrienTorris commented Mar 9, 2017

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 added a commit to AdrienTorris/angular-electron that referenced this issue Mar 9, 2017
Fix the error reported in this issue :
angular#20
@AdrienTorris AdrienTorris linked a pull request Mar 9, 2017 that will close this issue
nayunhwan added a commit to nayunhwan/angular-electron that referenced this issue Mar 23, 2017
AdrienTorris added a commit to AdrienTorris/angular-electron that referenced this issue Apr 14, 2017
AdrienTorris added a commit to AdrienTorris/angular-electron that referenced this issue Apr 14, 2017
AdrienTorris added a commit to AdrienTorris/angular-electron that referenced this issue Apr 14, 2017
@mehranagh20
Copy link

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

@okonon
Copy link

okonon commented Sep 21, 2017

this is still an issue for me

@smshahinulislam
Copy link

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

@varogonz95
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

12 participants