下一次生成失败,出现看似无用的错误消息



我正在将一个项目从Heroku迁移到Vercel以利用Next.js。这不是我第一次使用Next,但我以前从未遇到过这样的错误。

我昨晚能够构建它,它运行得很好,但在某个地方,我最终得到了这个错误消息:

HookWebpackError: Unexpected '/'. Escaping special characters with  may help.
at makeWebpackError (/opt/homebrew/lib/node_modules/next/dist/compiled/webpack/bundle5.js:41630:9)
at /opt/homebrew/lib/node_modules/next/dist/compiled/webpack/bundle5.js:25321:12
at eval (eval at create (/opt/homebrew/lib/node_modules/next/dist/compiled/webpack/bundle5.js:140036:10), <anonymous>:48:1)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
-- inner error --
Error: Unexpected '/'. Escaping special characters with  may help.
at /Users/bigsexy/Desktop/currentProjects/portfolio_on_next/static/css/1ec7d2389c57fd3d.css:425:1
at Root._error (/opt/homebrew/lib/node_modules/next/dist/compiled/cssnano-simple/index.js:195:95188)
at Root.error (/opt/homebrew/lib/node_modules/next/dist/compiled/cssnano-simple/index.js:195:141043)
at Parser.error (/opt/homebrew/lib/node_modules/next/dist/compiled/cssnano-simple/index.js:195:103534)
at Parser.unexpected (/opt/homebrew/lib/node_modules/next/dist/compiled/cssnano-simple/index.js:195:104020)
at Parser.combinator (/opt/homebrew/lib/node_modules/next/dist/compiled/cssnano-simple/index.js:195:102267)
at Parser.parse (/opt/homebrew/lib/node_modules/next/dist/compiled/cssnano-simple/index.js:195:109511)
at Parser.loop (/opt/homebrew/lib/node_modules/next/dist/compiled/cssnano-simple/index.js:195:108916)
at new Parser (/opt/homebrew/lib/node_modules/next/dist/compiled/cssnano-simple/index.js:195:95045)
at Processor._root (/opt/homebrew/lib/node_modules/next/dist/compiled/cssnano-simple/index.js:195:111925)
at Processor._runSync (/opt/homebrew/lib/node_modules/next/dist/compiled/cssnano-simple/index.js:195:112432)
caused by plugins in Compilation.hooks.processAssets
Error: Unexpected '/'. Escaping special characters with  may help.
at /Users/bigsexy/Desktop/currentProjects/portfolio_on_next/static/css/1ec7d2389c57fd3d.css:425:1
at Root._error (/opt/homebrew/lib/node_modules/next/dist/compiled/cssnano-simple/index.js:195:95188)
at Root.error (/opt/homebrew/lib/node_modules/next/dist/compiled/cssnano-simple/index.js:195:141043)
at Parser.error (/opt/homebrew/lib/node_modules/next/dist/compiled/cssnano-simple/index.js:195:103534)
at Parser.unexpected (/opt/homebrew/lib/node_modules/next/dist/compiled/cssnano-simple/index.js:195:104020)
at Parser.combinator (/opt/homebrew/lib/node_modules/next/dist/compiled/cssnano-simple/index.js:195:102267)
at Parser.parse (/opt/homebrew/lib/node_modules/next/dist/compiled/cssnano-simple/index.js:195:109511)
at Parser.loop (/opt/homebrew/lib/node_modules/next/dist/compiled/cssnano-simple/index.js:195:108916)
at new Parser (/opt/homebrew/lib/node_modules/next/dist/compiled/cssnano-simple/index.js:195:95045)
at Processor._root (/opt/homebrew/lib/node_modules/next/dist/compiled/cssnano-simple/index.js:195:111925)
at Processor._runSync (/opt/homebrew/lib/node_modules/next/dist/compiled/cssnano-simple/index.js:195:112432)

我翻遍了每一个文件,都找不到这是在说什么,所以我猜它来自npm包?有没有办法保存失败生成的生成文件,以便我可以检查static/css/1ec...css文件?我尝试过使用--debug标志运行构建,但它不再提供任何信息。

我会发布代码片段,但我甚至不知道该去哪里看,所以这里是任何有想法的人的回购。

https://github.com/igloo1505/portfolio_on_next

提前感谢!

这里似乎有一个剩余的结束注释标记:https://github.com/igloo1505/portfolio_on_next/blob/main/css/App.css#L429

相关内容

  • 没有找到相关文章

最新更新