You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update package.json from @angular/cli": "1.0.0-rc.0 to @angular/cli": "1.0.0-rc.1.
The log given by the failure.
Cannot find name 'require' Cannot find namespace 'ol' Cannot find name 'describe' Cannot find name 'beforeEach' Cannot find name 'it' Cannot find name 'expect'
Mention any other details that might be useful.
When using certain 3rd party libraries or require() you need to add the types to the tsconfig.app.json as described here https://github.com/angular/angular-cli/wiki/stories-third-party-lib. In the latest RC1 it looks like the types option is ignored resulting the above error. If I remove the types entry and replace it with the global typeRoots entry it seems to work but is not ideal to pull in all types. This also affects the tsconfig.spec.json.
Activity
GustavoMantuan commentedon Mar 11, 2017
Thank you so much, Its helped me a lot.
zurie commentedon Mar 17, 2017
this helped me, would be nice to know a official workaround is in place or if i need to just memorize this as a 'gotcha' fix
filipesilva commentedon Mar 17, 2017
There has to be something else going on here. I know for a fact that
ng testworked in all RCs and it relies on having the jasmine types.I also just tried the https://github.com/angular/angular-cli/wiki/stories-third-party-lib example and it worked.
Have you tried clearing your local node_modules? Maybe there's something wrong in there.
I can't reproduce this myself. If you can provide a repo where this happens I can investigate.
coryrylan commentedon Mar 17, 2017
Yeah this has persisted since rc1 after clearing nodemodules. Going to update the project to the latest RC Monday and will report back
filipesilva commentedon Mar 18, 2017
Actually, I was investigating #5332 and it seems they are related.
The reason
ng testworks and has it's typings seems to be due to a weird (and erroneous) compilation setup.That error was seems to be masking this one.
fix(@angular/cli): fix test typings
fix(@angular/cli): fix test typings
filipesilva commentedon Mar 19, 2017
Further investigation reveals this is a windows specific problem. A fix is on the way.
fix(@angular/cli): fix test typings
fix(@angular/cli): fix test typings
fix(@angular/cli): fix test typings
fix(@angular/cli): fix test typings
fix(@angular/cli): fix test typings
fix(@angular/cli): fix test typings
fix(@angular/cli): fix test typings
fix(@angular/cli): fix test typings
fix(@angular/cli): fix test typings
fix(@angular/cli): fix test typings
fix(@angular/cli): fix test typings
angular-automatic-lock-bot commentedon Sep 6, 2019
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.
fix(@angular/cli): fix test typings