Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialIan Glencross
17,524 PointsWhen I try and add the line for the CDN I get an error : "Error in precompile" WHY?
This is regardless of whether I use jQuery 1.x ,2.x or 3.x or minified versions
for example :
<script src="https://code.jquery.com/jquery-1.12.4.js" integrity="sha256-Qw82+bXyGq6MydymqBxNPYTaUXXq7c8v3CwiYwLLNXU=" crossorigin="anonymous"></script>
I have tried removing the integrity / crossorigin parameters but it doesn't make any difference.
And I am inserting this into the index.html in the correct location - just above the call the js/app.js
<!DOCTYPE html>
<html>
<head>
<title>Take Evasive Action</title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" title="no title" charset="utf-8">
</head>
<body>
<p class="warning">
<span>It's A Trap!</span>
</p>
<div class="image">
<img src="img/ackbar.gif">
</div>
<script src="https://code.jquery.com/jquery-1.12.4.js" integrity="sha256-Qw82+bXyGq6MydymqBxNPYTaUXXq7c8v3CwiYwLLNXU=" crossorigin="anonymous"></script>
<script src="js/app.js" type="text/javascript" charset="utf-8"></script>
</body>
</html>
10 Answers
Jay Padzensky
4,731 PointsHi folks!
Good news, everyone! I've heard back from our developers that this Code Challenge should now be fixed! Thanks so much for your patience and efforts!
jacobproffer
24,604 PointsHey Ian,
If you're looking to use a CDN for jQuery, why not use Google Hosted Libraries? Short and simple.
<!-- 2.x snippet -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<!-- 3.x snippet -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
</body>
As far as your error goes, do you have any more info? Keep in mind that 1.12.4 is a bit dated.
Ian Glencross
17,524 PointsI only used the code.jquery.com CDN as it was explicitly specified in the exercise. Regardess though - I tried the googleapi.com as you suggested - same result. What does "Error in precomile" actually mean in this insatnce - I've seen it before in ruby on Rails .. but this is Javascript??
Ian Glencross
17,524 PointsLooking a bit deeper : it seems it's a fault with treehouse as several other students are getting the same problem.
Jay Padzensky
4,731 PointsSorry for any troubles! I've alerted our teaching team about this. Hopefully they'll be investigating it early this week, if not tomorrow. Appreciate the efforts and patience!
bevinwg
5,196 PointsThank you Jay- I've been stumped by this since last night and frustrated ( The links look quite a bit different now than what is shown in the video- I tried several different as well as exactly what he posted in the video and also keep getting the same response. Please advise once fixed. And thanks!!
Zachary Quinn
2,945 PointsI am also getting this same error when trying to complete this task, thank you for bringing it up Ian Glencross. Looking forward to the update Jay Padzensky
bevinwg
5,196 PointsThanks so much! Just worked for me!
Luis Pedro Juárez Aguilar
5,769 PointsI am also getting this error. OCD don;t want to leave this code challenge empty X(
Andrew Chalkley
Treehouse Guest TeacherIf you use the code.jquery.com CDN it should work fine. Let me know how you get on.
Luis Pedro Juárez Aguilar
5,769 PointsI can't see this challenge. I guess is under maintenance. but it has been for a month or so. Please let me know when I can take the challenge.
Jay Padzensky
4,731 PointsHi Luis,
So sorry the CC isn't loading for you- I don't seem to be having any troubles with it on my end. Do you mind emailing Support with a screenshot of what you're seeing and, if possible, the console of the page (via developer's tools). This may shed some light on the issue. Thanks! help@teamtreehouse.com
Luis Pedro Juárez Aguilar
5,769 PointsYes. thank you. I'm having this trouble with all challenges and didn't realize it. I'm sending an e-mail with all the info
Zachary Quinn
2,945 PointsZachary Quinn
2,945 PointsWorks for me now! Thank you for the quick action.