-
Notifications
You must be signed in to change notification settings - Fork 16
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
Comments
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. |
I got the web page running, with the changes I made to your files listed
below.
But when I type in a word, I get console error in browser like
Console error:
zone.js:1990 GET http://localhost:4201/suggest-keywords?q=banana
net::ERR_CONNECTION_REFUSED
Response {_body: ProgressEvent, status: 0, ok: false, statusText: "",
headers: Headers…}
headers
:
Headers
ok
:
false
status
:
0
statusText
:
""
type
:
3
url
:
null
_body
:
ProgressEvent
__proto__
:
Body
I tried changing app.js to use plain http server, and
pun-service.service.ts to use http gets, but still get same error.
Maybe this demo is beyond my abilities to get working :(
errors and file changes to fix them:
*npm install problems - *
npm WARN @angular/[email protected] requires a peer of zone.js@^0.8.4 but none was
installed.
fixed by editting package.json, change zone.js vesion to
"zone.js": "^0.8.4"
and re-run npm install
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or
higher to avoid a RegExp DoS issue
solution:
npm install mimimatch
*ng serve ERROR's -*
6 errors like:
ERROR in
C:/Users/jjadamec/workspace/rxjs-test/node_modules/@angular/material/typings/dialog/dialog-container.d.ts
(2,32): Cannot find module '@angular/animations'.
solution: run
npm install '@angular/animations'
then add to app.module.ts
import { BrowserAnimationsModule } from
'@angular/platform-browser/animations';
and add to imports: [ in same file this:
BrowserAnimationsModule,
3 errors like:
ERROR in
C:/Users/jjadamec/workspace/rxjs-test/src/app/google-vision.service.ts
(3,24): Cannot find module './api.key'.
problem, file api.key is git-ignored, and was not checked in.
.gitignore file has:
#API Key File
/src/app/api.key.ts
Solution,comment out api.key import from google-vision.service.ts
//import { apiKey } from './api.key';
and change this line to bogus text like:
`https://vision.googleapis.com/v1/images:annotate?key=BOGUS`,
6 errors like:
ERROR in
C:/Users/jjadamec/workspace/rxjs-test/src/app/app.component.spec.ts (6,1):
Cannot find name 'describe'.
solution: add these "types": in tsconfig.json
"jasmine",
"node",
"q",
"selenium-webdriver"
1 error like:
ERROR in
./~/css-loader?{"sourceMap":false,"importLoaders":1}!./~/postcss-loader!./src/styles.css
Module not found: Error: Can't resolve
'@angular/material/core/theming/prebuilt/indigo-pink.css' in
'C:\Users\jjadamec\workspace\rxjs-test\src'
solution: comment out the first line and add the second in styles.css
/* @import '~@angular/material/core/theming/prebuilt/indigo-pink.css'; */
@import '~@angular/material/prebuilt-themes/indigo-pink.css';
…On Tue, Apr 11, 2017 at 9:12 PM, Tracy Lee ***@***.***> wrote:
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.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AG0kRDjfwZptqD88LUyjIlIH5r_A_Rteks5rvEEqgaJpZM4M5SF_>
.
|
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. |
I should write a blog post on how to create this app! It will come soon. :) |
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 -Install @angular/animations: -to get rid of the test file errors, I put the following on top of app.component.spec.ts: -for the resolve error in styles.css replace: 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 Hope this helps |
Thanks so much @fulltilt ! |
I keep getting this error
Cant seem to proceed beyond this point. |
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)
I keep getting these errors when I try "ng serve"
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??
The text was updated successfully, but these errors were encountered: