最近在学习Vuetify的使用,接触到了lux-ui,它是一个很棒的教材,集成了众多现有工具,记录一下遇到的错误:

X [ERROR] Could not resolve "@tiptap/extension-text-style"

    node_modules/@tiptap/extension-ordered-list/dist/index.js:3:26:
      3 │ import { TextStyle } from '@tiptap/extension-text-style';
        ╵                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "@tiptap/extension-text-style" as external to exclude it from the bundle,
  which will remove this error and leave the unresolved path in the bundle.

X [ERROR] Could not resolve "@tiptap/extension-text-style"

    node_modules/@tiptap/extension-bullet-list/dist/index.js:3:26:
      3 │ import { TextStyle } from '@tiptap/extension-text-style';
        ╵                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "@tiptap/extension-text-style" as external to exclude it from the bundle,
  which will remove this error and leave the unresolved path in the bundle.

看字体意思是丢失了引用模块,在这里:

  import { TextStyle } from '@tiptap/extension-text-style';

  我们只需要引用相应的模块就可以解决了。可以在package.json文件中添加如下行来解决:

    "@tiptap/extension-text": "^2.8.0",
    "@tiptap/extension-text-style": "^2.8.0",
	

添加引用后别忘记下载相应的模块。