如何解决 Vercel 部署过程中出现的 TinyMCE 错误?

问题描述 投票:0回答:1

如何解决 Vercel 部署过程中出现的 TinyMCE 错误?

Error: [vite]: Rollup failed to resolve import "@tinymce/tinymce-react" from "/vercel/path0/blogspurr/src/components/Blogform/TinyMCE.jsx".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
    at viteWarn (file:///vercel/path0/blogspurr/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:48216:27)
    at onwarn (file:///vercel/path0/blogspurr/node_modules/@vitejs/plugin-react/dist/index.mjs:249:9)
    at onRollupWarning (file:///vercel/path0/blogspurr/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:48245:9)
    at onwarn (file:///vercel/path0/blogspurr/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:47976:13)
    at file:///vercel/path0/blogspurr/node_modules/rollup/dist/es/shared/node-entry.js:24276:13
    at Object.logger [as onLog] (file:///vercel/path0/blogspurr/node_modules/rollup/dist/es/shared/node-entry.js:25950:9)
    at ModuleLoader.handleInvalidResolvedId (file:///vercel/path0/blogspurr/node_modules/rollup/dist/es/shared/node-entry.js:24862:26)
    at file:///vercel/path0/blogspurr/node_modules/rollup/dist/es/shared/node-entry.js:24822:26
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Error: Command "npm run build" exited with 1

我在我的应用程序中使用 TinyMCE,在部署此构建时出现错误。

debugging
1个回答
-1
投票

首先你需要去github。

打开您的项目。

打开代码空间。

部署您的项目。

然后写下安装tinymce的步骤。

并保存更改。

然后就可以了。

确保检查 package.json 依赖项并查找tinymce

© www.soinside.com 2019 - 2024. All rights reserved.