jjzjj

uncaught

全部标签

javascript - 从 'react' 导入 React 导致 Uncaught SyntaxError : Unexpected identifier

我已经安装了webpack3和babel,我的条目index.js/bundle.js将构建并运行,我已经用ES7/8功能测试过,但是导入不会工作并导致UncaughtSyntaxError:Unexpectedidentifier。我已经尝试将babel配置放在package.json以及我的应用程序根目录中的单独.babelrc文件中,但在尝试时仍然出现错误进口。我是否缺少包裹或设置?index.js(有效)//doesnotwork//importReactfrom'react'//worksconstobject1={a:'somestring',b:42,c:false};c

javascript - 使用 Pagedown 我得到 "Uncaught TypeError: Cannot read property ' attachEvent' of null"

每当我加载一个带有非常简单示例的页面时,我都会得到UncaughtTypeError:Cannotreadproperty'attachEvent'ofnull.Markdown.Editor.js:273在我的Chrome控制台日志中。在Firebug中我得到elemisnull[BreakOnThisError]if(elem.attachEvent){Markdo...itor.js(line273)为什么会出现这些错误,我该如何解决? 最佳答案 看看demo中的代码.(function(){varconverter1=Mar

javascript - TweenMax 无法正确初始化 : "Uncaught Cannot tween a null target."

在我的应用程序中,我尝试使用TweenMax/TimelineMaxlibrariesofGSAP动画变化,但我在我的代码中遇到了一个早期错误。简化(这是一个使用ES6的React/Redux应用程序):importTimelineMaxfrom'gsap';importTweenMaxfrom'gsap';importGSAPfrom'gsap-react-plugin';importReactDOMfrom'react-dom';someFunction(){varmailboxDropdown=ReactDOM.findDOMNode(this.refs.mailboxDropd

javascript - Webpack 错误 bundle.js :1 Uncaught SyntaxError: Unexpected token <

我在本地运行服务器并收到错误bundle.js:1UncaughtSyntaxError:Unexpectedtoken在输出bundle.js中是index.html文件的html代码。这是设置我的webpack.config文件。你能告诉我设置有什么问题吗?importpathfrom'path';importwebpackfrom'webpack';exportdefault{devtool:'eval-source-map',entry:['webpack-hot-middleware/client',path.join(__dirname,'/client/index.js'

javascript - Uncaught Error : [$injector:unpr] Unknown provider Ionic Framework/AngularJS

在localstoragetutorialontheIonicblog之后,我试图在我的Ionic应用程序运行时设置/获取localStorage值,但我收到错误消息:UncaughtError:[$injector:unpr]Unknownprovider:$localstorageProvider我的app.js代码:angular.module('starter',['ionic','starter.controllers','starter.services']).run(function($ionicPlatform,$localstorage){$ionicPlatform

javascript - Angular 1.4.5 : Uncaught Error: [$injector:modulerr] ngRoute

当我尝试刷新页面时出现此错误:angular.js:38http://errors.angularjs.org/1.4.5/$injector/modulerr?p0=myApp&p1=Error%3A%2…ogleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.5%2Fangular.min.js%3A19%3A381)我有一个依赖于ngRoute的简单模块:varapp=angular.module('myapp',["ngRoute"]);app.config(function($routeProvider){$routeProvider.whe

javascript - Uncaught ReferenceError : $scope is not defined

加载页面时收到错误。我正在尝试将一个新对象附加到条目数组。代码有什么问题?index.html抽奖员{{entry.name}}抽奖.jsangular.module('myApp',[]).controller("RaffleCtrl",function($scope){$scope.entries=[{name:"Larry"},{name:"Curly"},{name:"Moe"}]});$scope.addEntry=function(){$scope.entries($scope.newEntry)$scope.newEntry={}}; 最佳答案

javascript - 如何解决这个 "Uncaught TypeError: Cannot convert undefined or null to object "

我的功能是:functioncollect_que_ids(e){varval=e.val();vardata_lo=e.attr('data-lo');new_hash={};new_hash[val]=data_lo;if(e.is(':checked')){if(checked_box_hash.includes(new_hash)){checked_box_hash;}else{checked_box_hash.push(new_hash);}}else{new_hash_key=Object.keys(new_hash)[0]new_hash_value=new_hash[n

javascript - Uncaught ReferenceError : Stripe is not defined - STRIPE ERROR

我正在尝试将Stripe元素实现到我的Rails应用程序中,但我似乎无法正确包含stripe.js。这是我的application.htmlJSvarstripe=Stripe($("meta[name='stripe-key']").attr("content"))varelements=stripe.elements();varcard=elements.create('card',{style:{base:{iconColor:'#999',color:'#505652',lineHeight:'40px',fontWeight:300,fontFamily:'Helvetica

javascript - Moment Timezone 在加载时返回 Uncaught TypeError

我正在努力将MomentTimezone实现到Django应用程序中,以便更正从不同时区访问它的用户,并且在通过Require.js导入文件时遇到错误。moment.js、moment-timezone.js和moment-timezone-data.js都在加载,但是当我的脚本运行并尝试启动它们时,moment-timezone.js和moment-timezone-data.js抛出未捕获的类型错误。我的moment-timezone-data.js文件是从Moment.jstimezonedatagenerator复制粘贴的看起来像这样(尽管有更多时区):moment.tz.ad