ga-wdi-boston / team-project

Other
2 stars 39 forks source link

lost my jquery library? #380

Closed 3point14guy closed 7 years ago

3point14guy commented 7 years ago

I am getting a linter error: '$' is not defined. (no-undef)

I am getting this error in all my events and api files.

Google search suggests that something happened to my library or I am not requiring in the correct order. I feel it is the first possibility as I didn't make any changes to the script tags in the template.

package.json has jquery listed as a dependency.

jordanallain commented 7 years ago

did you npm install?

3point14guy commented 7 years ago

I did.

scottyscripts commented 7 years ago

If you guys added a script tag to index.html for datatables, this could be causing the issue. I highly suggest linking to datatables using the npm package and not by linking to it in index.html. https://datatables.net/download/npm

3point14guy commented 7 years ago

Ok. That script is currently commented out on the branch I am working on.

cpearce31 commented 7 years ago

Did commenting it out make the error go away?

3point14guy commented 7 years ago

That wasn't clear. It has been commented out the entire time.

payne-chris-r commented 7 years ago

In what file are you getting that error, and do you have script tags in your index.html?

3point14guy commented 7 years ago

This is a linter error in my events.js and api.js files.

3point14guy commented 7 years ago

The issue is because the files I am working on were no in my scripts folder. Moved files and error went away!

Thanks guys!!