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

ng serve errors #10

Open
jjadamec opened this issue Apr 10, 2017 · 7 comments
Open

ng serve errors #10

jjadamec opened this issue Apr 10, 2017 · 7 comments

Comments

@jjadamec
Copy link

I keep getting these errors when I try "ng serve"

ERROR in C:/Users/jjadamec/workspace/rxjs-test/src/app/google-vision.service.ts (3,24): Cannot find module './api.key'.

ERROR in C:/Users/jjadamec/workspace/rxjs-test/src/app/app.component.spec.ts (6,1): Cannot find name 'describe'.
C:/Users/jjadamec/workspace/rxjs-test/src/app/app.component.spec.ts (7,3): Cannot find name 'beforeEach'.

I googled these errors, and most people are saying typings is not installed.
But I did get typings installed and running with " npm install typings -g"

$ typings --version
2.1.1

$ node --version
v6.10.2

$ npm --version
3.10.10

Its my first Angular demo I'm trying to get running. So any suggestions??

@ladyleet
Copy link
Owner

looks like typings for the tests aren't cooperating.. you can either try to run npm install again, or you can just delete the tests that are bothering it.

@jjadamec
Copy link
Author

jjadamec commented Apr 14, 2017 via email

@ladyleet
Copy link
Owner

We didn't check in the api key - so if you go to Google Cloud API and sign up, input your own API key, see if that helps?

Let's see.. oh yes. MaterialModule is now deprecated so you'll have to import specific items. Though, I think if you remove the ^ from the angular material in your package.json to the version we used, that should fix a few things.

@ladyleet
Copy link
Owner

I should write a blog post on how to create this app! It will come soon. :)

@fulltilt
Copy link

fulltilt commented Apr 15, 2017

I just got it to work just now. Here are the modifications I had to make after cloning from master:

Angular CLI: @angular/cli: 1.0.0
Node: 6.9.5

-Install @angular/animations:
yarn add @angular/animations

-to get rid of the test file errors, I put the following on top of app.component.spec.ts:
import {} from 'jasmine';

-for the resolve error in styles.css replace:
@import '~@angular/material/core/theming/prebuilt/indigo-pink.css';

with

@import '~@angular/material/prebuilt-themes/indigo-pink.css';

-For the api key error, I created a new Google Vision api key and I just manually added it to google-vision-service.ts

-for the server, I just did a simple node app.js and the app worked

Hope this helps

@ladyleet
Copy link
Owner

Thanks so much @fulltilt !

@coderonfleek
Copy link

I keep getting this error

ERROR in /Users/imac/Documents/Practise/Third-Party-repos/rxjs-test-master/src/app/google-vision.service.ts (31,5): Type 'Observable<{}[]>' is not assignable to type 'Observable<string[]>'.
  Type '{}[]' is not assignable to type 'string[]'.
    Type '{}' is not assignable to type 'string'.

Cant seem to proceed beyond this point.

wingy3181 added a commit to wingy3181/rxjs-test that referenced this issue Feb 9, 2018
There were errors when trying to build and serve this application due to
being written a year ago with an older version of angular cli.

ladyleet#10 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants