【发布时间】:2022-06-11 04:12:54
【问题描述】:
我在 Vercel 或 Heroku 上编译时不断收到此错误,但在我的 PC 上没有。
Module not found: Error: You attempted to import /vercel/path0/node_modules/console-browserify/index.js which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
这是我在 Vercel 上运行 npm run build 时遇到的错误,它不会在本地构建中发生。
我尝试更改 webpack 版本(它只是给出了不同的错误)。 我不知道在哪里使用控制台浏览器(除了反应本身)。
【问题讨论】:
标签: javascript reactjs browserify