1

我正在设置一个新的 Web 应用程序,以 feathersjs 作为后端,Vue + 羽毛客户端 (feathers-vuex) 作为我的前端。但是,使用 npm 安装软件包后,我收到多个导入错误,如下所示 -

Could not find a declaration file for module 'module-name'. '/path/to/module-name.js' implicitly has an 'any' type

以下模块(包括 npm install 命令)会发生这种情况:

前端:

    @feathersjs/feathers 
    @feathersjs/socketio-client 
    socket.io-client 
    @feathersjs/authentication-client 
    feathers-vuex --save

后端:

    feathers-sequelize
    feathersjs-authentication
    feathersjs-authentication-local

我查看了这个 stackoverflow 问题 找不到模块“模块名称”的声明文件。'/path/to/module-name.js' 隐含一个 'any' 类型

我尝试从 @types 安装类型,这些类型适用于某些模块,除了:feathers-sequelize (Backend) 和 feathers-vuex (Frontend)

似乎没有为任何一个创建 *.d.ts 文件,这是我当前设置中缺少的内容。

我缺少一些基本的东西吗?我是 node.js 和 feathersjs 世界的新手,因此对任何菜鸟错误表示歉意!

4

0 回答 0