PHP Artisan迁移显示很多JavaScript错误

我一直在尝试在Laravel中迁移一个新表。输入后

php7.1 artisan migrate

它显示了这一点

r=n(55),o=n(1).has,i=n(1).isValidEntityCode,a=n(1).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,c=/^&([a-z][a-z0-9]{1,31});/i;t.exports=function(t,e){var n,u,l=t.pos,f=t.posMax;if(38!==t.src.charCodeAt(l))return!1;if(l+1<f)if(35===t.src.charCodeAt(l+1)){if(u=t.src.slice(l).match(s))return e||(n="x"===u[1][0].toLowerCase()?parseInt(u[1].slice(1),16):parseInt(u[1],10),t.pending+=i(n)?a(n):a(65533)),t.pos+=u[0].length,!0}else if((u=t.src.slice(l).match(c))&&o(r,u[1]))return e||(t.pending+=r[u[1]]),!0;return e||(t.pending+="&"),t.pos++,!0}},function(t,e,n){"use strict";t.exports=function(t){var e,n,r,o,i=t.delimiters,a=t.delimiters.length;for(e=0;e<a;e++)if((r=i[e]).close)for(n=e-r.jump-1;n>=0;){if((o=i[n]).open&&o.marker===r.marker&&o.end<0&&o.level===r.level){var s=!1;if((o.close||r.open)&&void 0!==o.length&&void 0!==r.length&&(o.length+r.length)%3==0&&(o.length%3==0&&r.length%3==0||(s=!0)),!s){r.jump=e-n,r.open=!1,o.end=e,o.jump=0;break}}n-=o.jump+1}}},r=0,o=t.tokens,i=t.tokens.length;for(e=n=0;e<i;e++)o[e].nesting<0&&r--,o[e].level=r,o[e].nesting>0&&r++,"text"===o[e].type&&e+1<i&&"text"===o[e+1].type?o[e+1].content=o[e].content+o[e+1].content:(e!==n&&(o[n]=o[e]),n++);e!==n&&(o.length=n)}},n){"use strict";var r=n(38),o=n(1).isWhiteSpace,i=n(1).isPunctChar,a=n(1).isMdAsciiPunct;function s(t,r){this.src=t,this.env=n,this.md=e,this.tokens=r,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[]}s.prototype.pushPending=function(){var t=new r("text","",0);return t.content=this.pending,t.level=this.pendingLevel,this.tokens.push(t),t},s.prototype.push=function(t,n){this.pending&&this.pushPending();var o=new r(t,n);return n<0&&this.level--,o.level=this.level,n>0&&this.level++,this.pendingLevel=this.level,this.tokens.push(o),o},s.prototype.scanDelims=function(t,s,c,l,f,p,d,h=t,m=!0,g=!0,v=this.posMax,b=this.src.charCodeAt(t);for(n=t>0?this.src.charCodeAt(t-1):32;h<v&&this.src.charCodeAt(h)===b;)h++;return s=h-t,r=h<v?this.src.charCodeAt(h):32,f=a(n)||i(String.fromCharCode(n)),d=a(r)||i(String.fromCharCode(r)),l=o(n),(p=o(r))?m=!1:d&&(l||f||(m=!1)),l?g=!1:f&&(p||d||(g=!1)),e?(c=m,u=g):(c=m&&(!g||f),u=g&&(!m||d)),{can_open:c,can_close:u,length:s}},s.prototype.Token=r,t.exports=s},n){"use strict";function r(t){return Array.prototype.slice.call(arguments,1).forEach(function(e){e&&Object.keys(e).forEach(function(n){t[n]=e[n]})}),t}function o(t){return Object.prototype.toString.call(t)}function i(t){return"[object Function]"===o(t)}function a(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var s={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var c={"http:":{validate:function(t,n){var r=t.slice(e);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,n){var r=t.slice(e);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,n.re.no_http.test(r)?e>=3&&":"===t[e-3]?0:e>=3&&"/"===t[e-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(t,n){var r=t.slice(e);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},u="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",l="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function f(t){var e=t.re=n(150)(t.__opts__),r=t.__tlds__.slice();function s(t){return t.replace("%TLDS%",e.src_tlds)}t.onCompile(),t.__tlds_replaced__||r.push(u),r.push(e.src_xn),e.src_tlds=r.join("|"),e.email_fuzzy=RegExp(s(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(s(e.tpl_link_fuzzy),e.link_no_ip_fuzzy=RegExp(s(e.tpl_link_no_ip_fuzzy),e.host_fuzzy_test=RegExp(s(e.tpl_host_fuzzy_test),"i");var c=[];function l(t,e){throw new Error('(LinkifyIt) Invalid schema "'+t+'": '+e)}t.__compiled__={},Object.keys(t.__schemas__).forEach(function(e){var n=t.__schemas__[e];if(null!==n){var r={validate:null,link:null};if(t.__compiled__[e]=r,"[object Object]"===o(n))return!function(t){return"[object RegExp]"===o(t)}(n.validate)?i(n.validate)?r.validate=n.validate:l(e,n):r.validate=function(t){return function(e,n){var r=e.slice(n);return t.test(r)?r.match(t)[0].length:0}}(n.validate),void(i(n.normalize)?r.normalize=n.normalize:n.normalize?l(e,n):r.normalize=function(t,e){e.normalize(t)});!function(t){return"[object String]"===o(t)}(n)?l(e,n):c.push(e)}}),c.forEach(function(e){t.__compiled__[t.__schemas__[e]]&&(t.__compiled__[e].validate=t.__compiled__[t.__schemas__[e]].validate,t.__compiled__[e].normalize=t.__compiled__[t.__schemas__[e]].normalize)}),t.__compiled__[""]={validate:null,normalize:function(t,e){e.normalize(t)}};var f=Object.keys(t.__compiled__).filter(function(e){return e.length>0&&t.__compiled__[e]})

这两个屏幕截图之间有很多行

nListRow",{attrs:{label:"Message"}},[n("code",{staticClass:"code-block"},[n("pre",[t._v(t._s(t.event.label))])])]),t._v(" "),n("DefinitionListRow",{attrs:{label:"Level"}},[t._v("\n            "+t._s(t.event.metadata.level)+"\n        ")]),t._l(t.event.context,function(e,r){return n("DefinitionListRow",{key:r,attrs:{label:r}},[t._v("\n            "+t._s(e)+"\n        ")])})],2)],1)},[],!1,null,null);e.default=a.exports},n){"use strict";n.r(e);var r=n(90),o=n.n(r),i=n(3),a={components:{DefinitionListRow:n(2).a,DefinitionList:i.a},props:["event"],methods:{formatQuery:function(t){return o.a.format(t)}}},s=n(0),c=Object(s.a)(a,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("DefinitionList",{attrs:{title:"Query"}},[n("DefinitionListRow",{attrs:{label:"Query"}},{domProps:{innerHTML:t._s(t.formatQuery(t.event.label))}})])]),{attrs:{label:"Time"}},[t._v("\n            "+t._s(t.event.metadata.time)+"\n        ")]),{attrs:{label:"Connection name"}},[t._v("\n            "+t._s(t.event.metadata.connection_name)+"\n        ")]),null);e.default=c.exports}]);</script>
<script>
    window.Ignition = window.ignite(window.data);
</script>
<script>
    Ignition.start();
</script>
</body>
</html>

我也尝试过composer dump-autoload

此外,检查了我的数据库凭据。很好。

我不知道我在做什么错。

任何帮助将不胜感激。

谢谢。

编辑

Laravel日志显示了这一点

Declaration of Symfony\Component\Translation\TranslatorInterface::setLocale($locale) must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::setLocale(string $locale) {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 64): Declaration of Symfony\\Component\\Translation\\TranslatorInterface::setLocale($locale) must be compatible with Symfony\\Contracts\\Translation\\LocaleAwareInterface::setLocale(string $locale) at /homepages/24/d521513763/htdocs/OfficePlantsToronto/vendor/symfony/translation/TranslatorInterface.php:24)
shehuan 回答:PHP Artisan迁移显示很多JavaScript错误

第一件事是Laravel 6.x需要PHP> = 7.2。

您使用的是不同版本的PHP,似乎原来没有PHP> = 7.2就无法安装Laravel 6。

要解决此问题,您需要拥有比7.1更高的PHP版本。

github上的一些参考文献:

https://github.com/laravel/framework/issues/30655

https://github.com/symfony/symfony/issues/34506

https://github.com/symfony/symfony/issues/34482

,

运行此命令

php artisan migrate
本文链接:https://www.f2er.com/3024161.html

大家都在问