私はANTLR4パーサをCodeMirrorテキストエディタに統合しようとしています。私はChromeで次のエラーを取得していますCodeMirrorでANTLRパーサを使用する
var antlr4 = require('antlr4/index'); // index is an ANTLR runtime file
::私は私のhtmlファイルに次の行を追加すると
Uncaught DOMException: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'file:///home/enes/Desktop/git/text_editor_mirror/antlr4/index.js'.
at require (file:///home/enes/Desktop/git/text_editor_mirror/lib/require.js:179:10)
at file:///home/enes/Desktop/git/text_editor_mirror/index.html:411:16
XMLHttpRequest cannot load file:///home/enes/Desktop/git/text_editor_mirror/antlr4/index.js. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.
だから、どのように私はこの問題を解決することができますか?