首页 > 其他分享 >swiper + ts 类型报错

swiper + ts 类型报错

时间:2023-07-27 17:57:04浏览次数:45  
标签:node ts 报错 swiper true moduleResolution

swiper + ts 类型报错

"swiper": "^9.4.1" 版本号

修改 tsconfig.json 文件下面的 moduleResolution 为node

{
  "compilerOptions": {
    "baseUrl": "./",
    "paths": {
      "@/*": [
        "src/*"
      ]
    },
    "target": "ES2020",
    "useDefineForClassFields": true,
    "lib": [
      "ES2020",
      "DOM",
      "DOM.Iterable"
    ],
    "module": "ESNext",
    "skipLibCheck": true,
    /* Bundler mode 类型报错在这里*/
    "moduleResolution": "node",
    "allowImportingTsExtensions": true,
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react-jsx",
    /* Linting */
    "strict": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noFallthroughCasesInSwitch": true,
    "typeRoots": [
      "./typings",
      "./node_modules/@types"
    ]
  },
  "include": [
    "src",
    "typings/**/*.ts"
  ],
  "references": [
    {
      "path": "./tsconfig.node.json"
    }
  ]
}

标签:node,ts,报错,swiper,true,moduleResolution
From: https://www.cnblogs.com/sjie/p/17585665.html

相关文章

  • PyCharm 获取 Conda 环境列表失败,报错 error code 1 的解决办法
    通常来说,在设置PythonInterpreter时,Condaexecutable的路径为anaconda\Scripts\conda.exe。但是我在给同事部署环境填入该路径,且路径下也确实有对应文件存在,却报错errorcode1。解决方案:用这个路径anaconda\Library\bin\conda.bat可解决问题。这让我想起在Mac上部署Conda......
  • appuim 做自动化测试的时候遇到的一些报错 附解决方法
    1、selenium.common.exceptions.InvalidElementStateException:Message:UnabletoperformW3Cactions.Checkthelogcatoutputforpossibleerrorreportsandmakesureyourinputactionschainisvalid.2、http.client.RemoteDisconnected:Remoteendclosedconn......
  • P9017 [USACO23JAN] Lights Off G 题解
    Description给定正整数\(N\),和两个长为\(N\)的\(01\)序列\(a\)和\(b\)。定义一次操作为:将\(b\)序列中的一个值翻转(即\(0\)变成\(1\),\(1\)变成\(0\),下同)。对于\(b\)序列中每个值为\(1\)的位置,将\(a\)序列中对应位置的值翻转。将\(b\)序列向右循环移位......
  • win 7发布.net4.6报错
    参考网址https://blog.csdn.net/kexiuyi/article/details/71488354如何用aspnet_regiis注册4.0框架 ①找到.NET4.0框架下aspnet_regiis所在目录,在C盘根目录中搜索aspnet_regiis,找到4.0框架下aspnet_regiis的目录位置,本人本本目录为"C:\Windows\Microsoft.NET\Framework\v4.0......
  • n stable报错curl: (7) Failed to connect to nodejs.org port 443: Connection refus
    nstable报错curl:(7)Failedtoconnecttonodejs.orgport443:ConnectionrefusedError:failedtodownloadversionindex(https://nodejs.org/dist/index.tab)使用淘宝源exportN_NODE_MIRROR=https://npm.taobao.org/mirrors/nodenstable......
  • python使用多进程multiprocessing执行报错
        inthemainmodule:      if__name__=='__main__':        freeze_support()        ...    The"freeze_support()"linecanbeomittediftheprogram    isnotgoingtobefrozentop......
  • 爬虫基本工具:urllib丶requests丶selenium丶pytesseract
    urllib来实现cookie和ip代理1fromurllib.requestimportRequest,build_opener,urlopen2fromfake_useragentimportUserAgent3fromurllib.parseimporturlencode4fromurllib.requestimportHTTPCookieProcessor5fromhttp.cookiejarimportCookieJ......
  • script setup lang="ts">和export default { setup() {区别是什么
    scriptsetuplang="ts">和exportdefault{setup(){区别是什么setup是Vue3新增的语法糖,可以让我们使用更简洁的代码来编写组件。它在编译时会将代码转换为使用setup函数的形式,省略了传统Vue组件中的template、data、methods等属性的定义。模板<template><......
  • 5、开发环境-远程启动Webots
    一、远程启动可以使用ssh(或类似命令)在远程计算机上启动Webot。然而,只有当Webots能够获得与本地运行的X服务器(在同一台计算机上)的X11连接时,它才能工作。当前无法将Webots图形输出重定向到另一台计算机。使用SSH命令以下是从计算机A启动的常用方法,该计算机是将在计算机B上运行的W......
  • 2、了解Webots的窗口-2
    一、WebotsGUI由四部分组成:1、3D窗口:显示并允许与3D模拟交互的窗口;2、Scenetree:它是当前世界的层次表示;3、Texteditor:允许编辑源码;4、Console:显示编译和控制输出;二、分别介绍一下八个菜单栏1、File:允许执行通常的文件操作,如加载,保存等等2、View:允许控制仿真窗口中的可视......