gpt4 book ai didi

webpack - fsevents 导致模块解析失败 : Unexpected character '�'

转载 作者:行者123 更新时间:2023-12-03 16:32:35 24 4
gpt4 key购买 nike

我正在使用 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,
]
不知道还能做什么。

最佳答案

我通过添加以下内容在我的 VS Code 扩展中修复了它:

{
test: /.node$/,
loader: 'node-loader',
}
module.ruleswebpack.config.js并添加:
    "node-loader": "^1.0.1",
devDependenciespackage.json

关于webpack - fsevents 导致模块解析失败 : Unexpected character '�' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64103792/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com