Skip to content
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

Cannot find type definition file for 'chai'. #3071

Closed
tarlepp opened this issue Nov 8, 2016 · 19 comments
Closed

Cannot find type definition file for 'chai'. #3071

tarlepp opened this issue Nov 8, 2016 · 19 comments

Comments

@tarlepp
Copy link

tarlepp commented Nov 8, 2016

OS?

Ubuntu 16.04

Versions.

angular-cli: 1.0.0-beta.19-3
node: 6.7.0
os: linux x64

Repro steps.

The log given by the failure.

wunder@Code-VirtualBox:~/projects/angular2-firebase-material-demo$ npm start

> angular2-firebase-material-demo@0.0.0 start /home/wunder/projects/angular2-firebase-material-demo
> ng serve --host 0.0.0.0

** NG Live Development Server is running on http://0.0.0.0:4200. **                                   12923ms building modules                                                               6ms add04101ms2195ms asse117ms emitting
Hash: af987254a406091fbfc8
Version: webpack 2.1.0-beta.25
Time: 20388ms
           Asset     Size  Chunks             Chunk Names
  main.bundle.js  4.71 MB    0, 2  [emitted]  main
styles.bundle.js  28.5 kB    1, 2  [emitted]  styles
       inline.js  5.53 kB       2  [emitted]  inline
        main.map  5.05 MB    0, 2  [emitted]  main
      styles.map  36.8 kB    1, 2  [emitted]  styles
      inline.map  5.59 kB       2  [emitted]  inline
      index.html  1.42 kB          [emitted]  

ERROR in [default] /home/wunder/projects/angular2-firebase-material-demo/node_modules/rxjs/observable/PairsObservable.d.ts:1:0 
Cannot find type definition file for 'chai'.

ERROR in [default] /home/wunder/projects/angular2-firebase-material-demo/node_modules/rxjs/observable/dom/AjaxObservable.d.ts:1:0 
Cannot find type definition file for 'chai'.
Child html-webpack-plugin for "index.html":
         Asset    Size  Chunks       Chunk Names
    index.html  3.8 kB       0       
webpack: bundle is now VALID.`
@clydin
Copy link
Member

clydin commented Nov 8, 2016

Did you change the rxjs version? It should be beta12.

@tarlepp
Copy link
Author

tarlepp commented Nov 8, 2016

Actually I did update that to newest one, because ncu told me there was newer version available...

So how should users know which packages to update and which not? Although it seems to work just fine if I just remove "rxjs": "5.0.0-rc.2" from my package.json and rm -rf node_modules + npm install

@tmtk75
Copy link

tmtk75 commented Nov 9, 2016

@tarlepp It seems rxjs requires @types/chai somehow.
I also ran into the same error message and I could solve with this in my case. Hope this helps you as a workaround to suppress the error messages.

npm i --save-dev @types/chai

I think chai is a test framework, so hope rxjs should not include the dependency in the released module.

@wulfsberg
Copy link

It is ReactiveX/rxjs#2112 (Which in turn apparently is a TypeScript compiler issue), so it is on the radar.

Manually adding chai types as dev dependency as @tmtk75 says is an easy workaround for now.

@clydin
Copy link
Member

clydin commented Nov 10, 2016

Angular has a fixed peerDep version of 5.0.0-beta.12. I wouldn't update until angular does as well.

@jayphelps
Copy link

jayphelps commented Nov 15, 2016

We believe we have fixed this in RxJS 5.0.0-rc3, which was just published. ReactiveX/rxjs#2120

Edit: we accidentally didn't include the fix in that release..so it's not fixed. Sorry folks! 😞

@cuongutd
Copy link

still getting error with RxJS 5.0.0-rc3

@jayphelps
Copy link

😢

@prafsoni
Copy link

just upgraded to rc3, still there.

@ezzkht
Copy link

ezzkht commented Nov 16, 2016

same issue here with rc3

@MarkPieszak
Copy link
Member

MarkPieszak commented Nov 16, 2016

The above comment npm i --save-dev @types/chai should fix it. Is there an open issue for Rxjs somewhere about this?

@jmesa-sistel
Copy link

@MarkPieszak
Read 5 comments above yours

@MarkPieszak
Copy link
Member

Missed that, thank you! Perfect. @jmesa-sistel

@windgaucho
Copy link

The solution of @tmtk75 worked for me on RxJS RC5

@tarlepp
Copy link
Author

tarlepp commented Nov 16, 2016

Yeah installing @types/chai fixes this, and the problem is still with latest RxJS

@xtianus79
Copy link

this should be easily fixed

but adding the dependency worked

lightningeater pushed a commit to Coppia/saas-web that referenced this issue Nov 17, 2016
lightningeater added a commit to Coppia/saas-web that referenced this issue Nov 17, 2016
* Build working, server runs

* move devDependencies, heroku doesn't pick them up

* trying different approach

* fix missing types for rxjs dependencies
angular/angular-cli#3071

* missing environment variable for api URL

* Fix all api post/put calls that require user id
@michaeljota
Copy link

This got fixed with lastes rxjs, closing the ref issue ReactiveX/rxjs#2112.

@tarlepp
Copy link
Author

tarlepp commented Nov 20, 2016

Yeah I can confirm that latest rxjs 5.0.0-rc.4 solves this, no need for npm i --save-dev @types/chai anymore. Closing this one for now.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests