-1

I just pulled a project, and did npm install. It works just fine at my work PC, but now I cannot start it, it keeps throwing error:

error TS2304: Cannot find name '$'.

for multiple components. I installed latest node version and latest npm version, installed node modules and this happens, anyone had similar issue?

Nemanja G
  • 1,760
  • 6
  • 29
  • 48

1 Answers1

1

So here, you must be using jquery in your project. As you mentioned you pulled and npm install, jquery must be installed with it. But you can try applying npm install --save @types/jquery and use import * as $ from "jquery"; in all the components where you used or imported '$'(jquery).

You can get further info about using jquery in angular project from here.

Yash Majithiya
  • 861
  • 1
  • 8
  • 20