我正在使用next.js
,并且出现以下问题:
Failed to compile.
./node_modules/fsevents/fsevents.node 1:0
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
我几乎尝试了所有方法,最近我在 package.json
中添加了以下内容:
"optionalDependencies": {
"fsevents": "^2.1.3"
}
在next.config.js
文件中,我有以下配置:
const withImages = require("next-images");
const withPlugins = require("next-compose-plugins");
const withCSS = require("@zeit/next-css");
module.exports = withPlugins([
withCSS,
withImages,
]
不确定还有什么其他可做的。