草庐IT

HIVE_CANNOT_OPEN_SPLIT

全部标签

javascript - 编译器不抛出 "Cannot find module"错误

在我的项目中我有2个文件:foo.jsconstimage=require('../this/path/is/wrong.png');boo.tsxconstimage=require('../this/path/is/wrong.png');在foo.js中TypeScript正确的发现图片不存在并抛出“Cannotfindmodule”错误,但是对于boo.tsx没有抛出错误所以该错误仅在应用程序崩溃时出现在运行时。如果我只是将boo.tsx重命名为boo.jsTS再次开始按预期抛出错误。这些是我认为可能相关的一些编译器选项:"module":"es2015","target":"

javascript - promise - TypeError : Cannot read property 'then' of undefined

我想我只需要另一双眼睛看这个,因为我无法得到我在这里缺少的东西。$scope.checkout=function(form){//somecodeherefunctioncheckoutErrorHandler(error){//somecodehere}functiondisplaySuccessMessage(){$scope.success=true;cartService.emptyCart();}checkoutService.makePayment($scope.payment).then(function(i){//somecodeherecheckoutService.

javascript - 用户界面路由器返回 : "Cannot GET/page"

我正在使用ui-router,并且有一个profile状态如下:.state('profile',{url:"/profile",templateUrl:"views/profile.html",controller:'ProfileCtrl',resolve:{currentUser:function(gamAuth){returngamAuth.checkCurrentUser(config.userRol.user)}}当我尝试重新加载/刷新页面时,我收到以下消息:CannotGET/profile当我在以下位置重新加载“着陆页”时,问题没有发生:http://localhost

javascript - 开 Jest + 火力地堡 : TypeError: Cannot read property 'defineProperties' of undefined

我目前正在做一个ReactNative项目,想使用FirebaseJSSDK。为了熟悉它的所有API,我想用Jest编写一些学习测试。这是我的测试:importFirebasefrom'firebase';describe('Firebase',function(){it('shouldwork',function() {expect(null).toBeNull()})});不幸的是我收到了这个错误:●测试套件运行失败TypeError:Cannotreadproperty'defineProperties'ofundefinedatnode_modules/firebase/app

javascript - IE8 - window.open() - "No such interface supported"

当我从JavaScript调用window.open()时,我收到带有消息“行:xxx错误:不支持此类接口(interface)”的错误对话框Google将我引导至早在IE4时就提到我需要在多个DLL上运行regsrvr32的网站。有没有更好的解决方案?编辑:请求的确切代码functionwindowOpen(){window.open("http://localhost/mysite/mypage.asp","myWindowName","");}HiThere编辑2:提供的答案都可以追溯到IE4/Win95时代。我是说,认真的??无论如何,我在IE8中禁用了平滑滚动(!!!)并且还

javascript - Microsoft Edge window.open() 不遵守宽度高度,并在后台打开

我使用的是Windows10预览版Build10130,新版Edge浏览器中的window.open方法未按规范运行。如果您使用https://msdn.microsoft.com/en-us/library/ms536651(v=vs.85).aspx中的示例代码,然后点击打开新窗口,会在后台打开一个新窗口,并且会完全忽略宽高。window.open()html,body{width:100%;height:100%;border:1pxsolidblack;}Clickthispageandwindow.open()iscalled.functionmyOpen(){window.

javascript - Vue.js : "TypeError: Cannot set property props of#<Object> which has only a getter"

我正在尝试实例化一个Vue组件,但出现错误:[Vuewarn]:Errorinrender:"TypeError:Cannotsetpropertypropsof#whichhasonlyagetter"(foundin)我也在使用库vuedraggable但我认为这个问题更多的是Vue问题而不是vuedraggable问题。下面是我的代码。这里是draggable-list.vue可拖动列表.jsconstdraggable=require("vuedraggable");module.exports={name:"draggable-list",components:{dragga

javascript - typescript 编译器错误 TS2307 : Cannot find module 'jquery'

我正在关注JSPM入门guide我想安装jquery包,所以我执行下面的命令。jspm安装jquery但是当我尝试像下面这样用typescript导入它时从“jquery”导入$我从typescript编译器中收到一个错误,提示errorTS2307:Cannotfindmodule'jquery'。不仅对于这个库,对于其他库我也遇到同样的错误。 最佳答案 您需要在编译上下文中包含jquery的类型定义,您可以从https://github.com/DefinitelyTyped/DefinitelyTyped中获取它们

javascript - 执行 Action 时 redux 出错 : Uncaught type error: cannot read property 'type' of undefined

刚刚接触React。我想这是一个基本问题,但我不明白为什么reducer没有被解雇或更新状态:我的HomeView.js:....const{localeChange,counter,locale}=this.propsreturn(increment(7)}>Increment.....)constmapStateToProps=(state)=>({locale:state.locale,counter:state.counter})exportdefaultconnect(mapStateToProps,{localeChange,increment})(HomeView)我的r

javascript - 在使用 window.open 打开的窗口中使用 document.write 编写的脚本元素不会在 Windows 7 的 IE8 中执行

我遇到了一个似乎只出现在Windows7上的问题。它似乎在不同版本的Windows上的IE8中运行良好。基本上,我使用window.open()创建一个新窗口,然后使用document.write()写入该新窗口的内容,其中包含脚本包含。在IE中,这些脚本未正确执行。大多数时候他们根本不执行,但偶尔会有一个执行。这仅适用于清除缓存-一旦javascript文件在缓存中,它就可以正常工作。归结测试用例:测试.html:varw=window.open();varwindowHTML="\\n\\n\\n\\n\\n\\n\\n\\n\";w.document.write(windowHT