0

So I have been having problems getting my angular app to build. In a previous question, someone suggested starting with a fresh install... so out of desperation, this is what I have done.

The following are the new set of problems...

Here it seems that JQuery is not recognised:

> ng serve

** NG Live Development Server is running on http://localhost:4200 **
Hash: d1f891d598c9af6a8b6f                                                               
Time: 5768ms
chunk    {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 153 kB {4} [initial] [rendered]
chunk    {1} main.bundle.js, main.bundle.js.map (main) 119 kB {3} [initial] [rendered]
chunk    {2} styles.bundle.js, styles.bundle.js.map (styles) 9.77 kB {4} [initial] [rendered]
chunk    {3} vendor.bundle.js, vendor.bundle.js.map (vendor) 2.99 MB [initial] [rendered]
chunk    {4} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]

WARNING in ./src/app/app.component.ts
138:336-345 "export 'AppConfig' was not found in './app-config'

WARNING in ./src/app/app.component.ts
138:365-374 "export 'AppConfig' was not found in './app-config'

    ERROR in ..src/app/app.component.ts (89,5): Cannot find name '$'.)
    ../src/app/app.component.ts (89,18): Cannot find name '$'.)
    ../src/app/app.component.ts (107,9): Cannot find name '$'.)
    ../src/app/app.component.ts (110,11): Cannot find name '$'.)
    ../src/app/app.component.ts (117,9): Cannot find name '$'.)
    ../src/app/app.component.ts (128,9): Cannot find name '$'.)
    ../src/app/app.component.ts (131,9): Cannot find name '$'.)
    ../src/app/app.component.ts (133,11): Cannot find name '$'.)
   ../src/app/app.component.ts (146,9): Cannot find name '$'.)
    ../src/app/app.component.ts (157,42): Cannot find name '$'.)
    ../src/app/app.component.ts (160,9): Cannot find name '$'.)
    ../src/app/app.component.ts (165,11): Cannot find name '$'.)
   ../src/app/app.component.ts (174,5): Cannot find name '$'.)
   ../src/app/app.component.ts (178,9): Cannot find name '$'.)
    ../src/app/app.component.ts (185,5): Cannot find name '$'.)
    ../src/app/app.component.ts (186,7): Cannot find name '$'.)
    ERROR in ../src/app/service/login.service.ts (9,12): Cannot find name '$'.)
    ../src/app/service/login.service.ts (16,17): Cannot find name '$'.)
    ../src/app/service/login.service.ts (17,17): Cannot find name '$'.)

Any suggestions as to how to resolve this?

1
  • What are you using jQuery for? Commented Feb 28, 2017 at 16:02

2 Answers 2

2

Seems you are using angular CLI, Did you include in your angular-cli.json file?

"scripts": [
  "../node_modules/jquery/dist/jquery.js"
]

Read more about Global Library Installation

Sign up to request clarification or add additional context in comments.

Comments

0

Follow these simple steps. It worked for me if you are using angular cli:

https://stackoverflow.com/a/42295505/7532440

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.