fsevents get error "Module parse failed: Unexpected character '�' (1:0)"
See original GitHub issueWhat is the problem
in ./node_modules/electron-reload/node_modules/fsevents/fsevents.node
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./node_modules/electron-reload/node_modules/fsevents/fsevents.js 13:15-41
node: 10.12.0 electron: 6.0.7
How to reproduce
just
require("electron-reload")(__dirname)
Additional information
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:14 (4 by maintainers)
Top Results From Across the Web
fsevents causes Module parse failed: Unexpected character ' '
Try check what encoding used in fsevents.node I was getting similar exception. Problem was in UTF-16 encoding of file.
Read more >React Module Parse Failed: Unexpected Character '@'
A fix for now is to install the alpha version of the library. I've done a small setup just now to test this...
Read more >Build Fails: webpack config.resolve.alias was incorrectly ...
I'm constantly getting a failed build because of 'webpack ... 10:55:40 PM: Module parse failed: Unexpected character ' ' (1:1) 10:55:40 PM: You...
Read more >fsevents - npm
Native Access to MacOS FSEvents. Latest version: 2.3.2, last published: 2 years ago. Start using fsevents in your project by running `npm i ......
Read more >webpack/webpack - Gitter
Can someone help me with this issue i can't seem to get the loader working. ... /ng-serve-logo-png10-error-module-parse-failed-unexpected-character-1.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@moarwick @Ratn I stumbled into the same problem today. A valid workaround for this problem is to add
fseventsto your Webpack externals:The issue is caused by this line
const Native = require('./fsevents.node');infsevents.js. Since we’re using webpack, the require that’s being used here is the Webpack-equivalent ofrequire()and not the one provided by node.@yan-foto I don’t, I just stumbled into this thread and it was the only one that comes up on Google with this problem. It’s completely fsevents related, but I just wanted to post a solution here to help fellow Googlers of the problem 😉