2015-01-13 1 views
0

어떤 이유로 든 내 Github 프로젝트 페이지에서 자바 스크립트를로드 할 수 없습니다. 나는 콘솔에서 다음을 얻고있다 : 여기github project pages 스크립트로 해석되었지만 MIME 형식으로 전송 된 리소스 text/htm

Resource interpreted as Script but transferred with MIME type text/html: "http://siddhion.github.io/scripts/cdf6190d.scripts.js". 
siddhion.github.io/:109 
Resource interpreted as Script but transferred with MIME type text/html: "http://siddhion.github.io/scripts/angular.min.js". 
angular.min.js:1 Uncaught SyntaxError: Unexpected token < 
cdf6190d.scripts.js:3 Uncaught ReferenceError: angular is not defined 
cdf6190d.scripts.js:1 Uncaught SyntaxError: Unexpected token < 

내 Github의 프로젝트 페이지입니다

http://siddhion.github.io/maxmythic/

내 GH-페이지 REPO https://github.com/siddhion/maxmythic/tree/gh-pages

어떤 아이디어

무엇을 것입니다 잘못된?

답변

1

당신은 당신이 스크립트에 사용하는 URL에서 프로젝트 이름을 누락되었습니다. GH-페이지 의 URL 형식은 다음과 같습니다

에 http : // {시^Ownername (사용자 또는 조직)} github.io/{project_name} 따라서 자바 스크립트 파일은 다음 URL 에 액세스 할 수 있습니다

. http://siddhion.github.io/maxmythic/scripts/cdf6190d.scripts.js

+0

그리고 올바른 MIME 유형 응용 프로그램/javascript가 제공됩니다. –

0

당신은

/scripts/cdf6190d.scripts.js 
/scripts/angular.min.js 

의 응답으로 자바 스크립트 코드를 기다리고있어하지만 그 대신 당신은 404 HTML 웹 페이지가 있어요.

enter image description here

관련 문제