Skip to content

Can't find name error when using ng serve #1959

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

Closed
seklyza opened this issue Sep 2, 2016 · 4 comments
Closed

Can't find name error when using ng serve #1959

seklyza opened this issue Sep 2, 2016 · 4 comments

Comments

@seklyza
Copy link

seklyza commented Sep 2, 2016

Please provide us with the following information:

  1. OS? Windows 10
  2. Versions. angular-cli: 1.0.0-beta.11-webpack.2
    node: 6.2.1
    os: win32 x64
  3. Repro steps. The app is created using the CLI. I ran ng init and then when it finishes installing I ran ng serve, and I get some errors like can't find name xxx.
  4. The log given by the failure. Normally this include a stack trace and some
    more information.
ERROR in [default] C:\Users\HOME\Desktop\newProj\node_modules\@types\jasmine\index.d.ts:26:29
Cannot find name 'Function'.

ERROR in [default] C:\Users\HOME\Desktop\newProj\node_modules\@types\jasmine\index.d.ts:31:25
Cannot find name 'Function'.

ERROR in [default] C:\Users\HOME\Desktop\newProj\node_modules\@types\jasmine\index.d.ts:35:21
Cannot find name 'Error'.

ERROR in [default] C:\Users\HOME\Desktop\newProj\node_modules\@types\jasmine\index.d.ts:40:35
Cannot find name 'Function'.

ERROR in [default] C:\Users\HOME\Desktop\newProj\node_modules\@types\jasmine\index.d.ts:52:50
Cannot find name 'Function'.

ERROR in [default] C:\Users\HOME\Desktop\newProj\node_modules\@types\jasmine\index.d.ts:60:33
Cannot find name 'RegExp'.

ERROR in [default] C:\Users\HOME\Desktop\newProj\node_modules\@types\jasmine\index.d.ts:110:24
Cannot find name 'Date'.

ERROR in [default] C:\Users\HOME\Desktop\newProj\node_modules\@types\jasmine\index.d.ts:123:52
Cannot find name 'Array'.

You got it... There are 491 errors like this.

  1. Mention any other details that might be useful.

The application works fine. (I think, not sure, only has 1 component with title = "app works!")


Thanks! We'll be in touch soon.

@seklyza seklyza changed the title Can't find name when using ng serve Can't find name error when using ng serve Sep 2, 2016
@celliott181
Copy link
Contributor

Current solution is to downgrade to TypeScript 2.0.0 both globally and locally. See #1901 and #1917

To downgrade if you have TypeScript installed globally:

  1. npm uninstall -g typescript
  2. npm install -g [email protected]

To downgrade locally:

  1. npm uninstall typescript
  2. npm install --save-dev [email protected]

@seklyza
Copy link
Author

seklyza commented Sep 2, 2016

Ok👌. Thank you. I will check if that works when I will be back home.

On Sep 2, 2016 17:28, "gelliott181" [email protected] wrote:

Current solution is to downgrade to TypeScript 2.0.0 both globally and
locally. See #1901 #1901
and #1917 #1917

To downgrade if you have TypeScript installed globally:

  1. npm uninstall -g typescript
  2. npm install -g [email protected]

To downgrade locally:

  1. npm uninstall typescript
  2. npm install --save-dev [email protected]


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#1959 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMYKLLf6ERa6tGwAU-6DWpSFMzxVPEG2ks5qmDJ-gaJpZM4JzwNA
.

@seklyza
Copy link
Author

seklyza commented Sep 2, 2016

@gelliott181, thank you very much you solved my problem.

On Fri, Sep 2, 2016 at 7:09 PM, שחר בן דוד [email protected] wrote:

Ok👌. Thank you. I will check if that works when I will be back home.

On Sep 2, 2016 17:28, "gelliott181" [email protected] wrote:

Current solution is to downgrade to TypeScript 2.0.0 both globally and
locally. See #1901 #1901
and #1917 #1917

To downgrade if you have TypeScript installed globally:

  1. npm uninstall -g typescript
  2. npm install -g [email protected]

To downgrade locally:

  1. npm uninstall typescript
  2. npm install --save-dev [email protected]


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#1959 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMYKLLf6ERa6tGwAU-6DWpSFMzxVPEG2ks5qmDJ-gaJpZM4JzwNA
.

@seklyza seklyza closed this as completed Sep 2, 2016
@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

2 participants