我正试图在一个码头容器中运行一个类型记录express.js。运行码头后,我得到以下错误:
> ts-node-dev src/app.ts
Using ts-node version 8.10.1, typescript version 3.9.2
TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
at Object.wa
我正在尝试打字稿,我发现它非常有用。
我有一个相当大的项目,我正在考虑用打字本重写它。这里的主要问题如下:
文件A.ts:
class A extends B {
// A stuff
}
文件B.ts:
class B {
// B stuff
}
如果我用以下命令编译A.ts:
tsc --out compiledA.js A.ts
我会从编译器那里得到错误,因为他不知道如何在扩展后威胁"B“。
因此,“解决方案”将包含在A.ts中(作为第一行代码):
/// <reference path="./B.ts" />
使用相同的命令再次编译
尝试对地图标记进行分组,然后对组进行聚焦和缩放。
我跟踪了Docs:
脚本
public viewGroupMarkers() {
// CREATE MARKERS
const toronto = new H.map.Marker({lat:43.7, lng:-79.4});
const boston = new H.map.Marker({lat:42.35805, lng:-71.0636});
const washington = new H.map.Marker({lat:38.8951, lng:-77.0
当我开发一个棱角2应用程序的类型,它编译为Javascript文件。浏览器中的错误指向.js文件中的一个行号,例如:
TypeError: Phone.query2 is not a function phone_list.controller.js:5:27)
但是,我想要的是指向实际.ts文件中的行的指针。
相应的源文件已经到位,生成的.js文件指向地图文件,例如:
//# sourceMappingURL=phone_list.controller.js.map
我试过在Firefox、Chrome和Webstorm中调试。
更新
要复制这些步骤,请执行以下步骤:
git clone h
当我尝试直接调用我的Firebase Cloud函数时,我收到以下错误: Error: internal
at new HttpsErrorImpl (error.ts:65)
at _errorForResponse (error.ts:175)
at Service.<anonymous> (service.ts:276)
at step (tslib.es6.js:102)
at Object.next (tslib.es6.js:83)
at fulfilled (tslib.es6.js:73) 我注意到用户过去也看到过类
我正在开发一个不和谐的机器人框架,它使用ts节点(在脚本模式下)、类型记录和discord.js。在测试核心客户端类时,我得到了以下错误:
C:\Users\thedi\Documents\coding\JS-TS\discord-bot\src\struct\Client.ts:13
super()
^
TypeError: Class constructor Client cannot be invoked without 'new'
at new DigsClient (C:\Users\thedi\Documents\coding
我想使用nativescript-youtubeplayer / nativescript-youtubeplayer-inline npm软件包在我的本地手机应用程序中播放youtube视频。我遵循了提供的步骤,当我试图使用tns运行android 命令构建我的应用程序时,我面临以下错误。
*JS: ERROR Error: Uncaught (in promise): TypeError: Class constructor View cannot be invoked without 'new'
JS: TypeError: Class constructor View
我使用的是一个名为react-canvas的库。 从几天前开始,在包括Chrome在内的浏览器中应该显示画布的区域中,输出了一条带有<p>标签的错误消息。 我正在使用nextjs,我附上了下面的package.json。 === SharedArrayBuffer is not defined ReferenceError: SharedArrayBuffer is not defined
at eval (webpack-internal:///./node_modules/jsdom/node_modules/webidl-conversions/lib/index.js:3
我使用Jest制作的代码库,但我找不到一种方法来运行导入组件的简单Vue3测试。这在使用Vue-cli创建的应用程序中工作得很好,但我找不到一种方法来让Jest在使用Vue3的Vue-Vite应用程序中工作。下面是我遇到的错误 FAIL docs/homepage.spec.js
● Test suite failed to run
Vue packages version mismatch:
- vue@3.0.0 (/var/www/html/my_project_vue3_vite/node_modules/vue/index.js)
- vue
当我在引导中使用router_1.provideRouter is not a function函数时,会得到错误的provideRouter。
router_1.provideRouter不是一个函数(…)
以下是我的boot.ts代码:
import {bootstrap} from 'angular2/platform/browser';
import {AppComponent} from './app.component';
import {Dashboard1Compo
我试图在类星体上使用,但显然我不能简单地安装它并在main.js文件中声明它,因为类星体没有。我还会得到以下错误:
Could not find a declaration file for module 'dropzone-vue'. 'c:/Users/me/Desktop/my-project/node_modules/dropzone-vue/dist/dropzone-vue.common.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/dropzone-
你好,我对覆盖类型有问题。
我想要覆盖一个从libary中添加属性到其他库的类型的类型,行是:
在我的代码中,我声明如下:
declare module 'discord.js' {
export interface Message {
util?: KopekUtil;
}
}
KopekUtil正在扩展CommandUtil,我得到的错误是:
TS2717: Subsequent property declarations must have the same type. Property 'util' must be of
如何将此.js文件转换为Typescript文件? import * as Colors from './colors';
import * as Spacing from './spacing';
import * as Typography from './typography';
import * as Mixins from './mixins';
export { Typography, Spacing, Colors, Mixins }; 谢谢 编辑1:我正在尝试修复以下错误: 找不到模块“_styles”或其对应
嗨,我试着在mikroORM运行播种机,我发现了问题。我所做的一切都是在这里写的:。
在mikro-orm路由文件夹中创建种子器目录( mikro-orm.config.ts)Updated mikro-mal.ts旁边有此linse: )
seeder: {
path: './seeders', // path to the folder with seeders
pathTs: './seeders', // path to the folder with TS seeders (if used, we should put path t
我将我的角度2柱塞从RC.4升级到了RC.5,我做了以下工作:
更新后的systemjs.config.js与匹配
更新后的main.ts与快速启动柱塞匹配
创建了文件app/app.module.ts,并将其填充到快速启动柱塞中。
我没有看到任何其他的变化,是需要我的简单柱塞。
我一直收到这样的错误:Error: TypeError: core_1.NgModule is not a function(…)