Open Redish101 opened 9 months ago
If this error is threw by something like fsevents.node
and you're using macOS, maybe you should configure node-loader
as webpack's loader for node files.
It's wired since everything just run expectively correctly on Ubuntu.
Especially for Next.js project. Try adding following configuration to next.config.js
:
webpack: (config, options) => {
config.module.rules.push({
test: /\.node/,
loader: "node-loader",
});
return config;
}
Check List
hexo version
to check)Expected behavior
Use hexo api in a nextjs project.
Actual behavior
It threw "Module parse failed: Unexpected character '�' (1:0)" in this code
How to reproduce?
Is the problem still there under
Safe mode
?Yes
Your Node.js & npm version
Your Hexo and Plugin version
Your
package.json
Your site's
_config.yml
(Optional)Others
No response