Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Module parse failed: Unexpected character" when running yarn build #54

Closed
laike9m opened this issue May 24, 2020 · 3 comments
Closed

Comments

@laike9m
Copy link

laike9m commented May 24, 2020

I was following the contributing guide.

After I run yarn, there were some warnings (listed in case it's relevant):

$ yarn                                                                                                                                                              
yarn install v1.22.4
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
warning debug-visualizer@1.1.0: The engine "vscode" appears to be invalid.
[3/4] 🔗  Linking dependencies...
warning "workspace-aggregator-a636d9d6-7cfd-4aff-a6f3-febd4ac43bff > @hediet/visualization > vis-network@7.3.6" has unmet peer dependency "keycharm@^0.2.0".
warning "workspace-aggregator-a636d9d6-7cfd-4aff-a6f3-febd4ac43bff > @hediet/visualization > vis-network@7.3.6" has unmet peer dependency "moment@^2.24.0".
warning "workspace-aggregator-a636d9d6-7cfd-4aff-a6f3-febd4ac43bff > @hediet/visualization > vis-network@7.3.6" has unmet peer dependency "uuid@^3.4.0".
warning "workspace-aggregator-a636d9d6-7cfd-4aff-a6f3-febd4ac43bff > @hediet/visualization > vis-network@7.3.6" has unmet peer dependency "vis-util@^3.0.0".
[4/4] 🔨  Building fresh packages...
✨  Done in 156.06s.

Then I run yarn build, an error showed up

...lines ommited

WARNING in ../node_modules/express/lib/view.js 81:13-25
Critical dependency: the request of a dependency is an expression
 @ ../node_modules/express/lib/application.js
 @ ../node_modules/express/lib/express.js
 @ ../node_modules/express/index.js
 @ ./src/Server.ts
 @ ./src/extension.ts

WARNING in ./node_modules/ws/lib/buffer-util.js
Module not found: Error: Can't resolve 'bufferutil' in '/Users/laike9m/Dev/VSC/vscode-debug-visualizer/extension/node_modules/ws/lib'
 @ ./node_modules/ws/lib/buffer-util.js
 @ ./node_modules/ws/lib/websocket.js
 @ ./node_modules/ws/index.js
 @ ./src/Server.ts
 @ ./src/extension.ts

WARNING in ../node_modules/ws/lib/buffer-util.js
Module not found: Error: Can't resolve 'bufferutil' in '/Users/laike9m/Dev/VSC/vscode-debug-visualizer/node_modules/ws/lib'
 @ ../node_modules/ws/lib/buffer-util.js
 @ ../node_modules/ws/lib/websocket.js
 @ ../node_modules/ws/index.js
 @ ../node_modules/isomorphic-ws/node.js
 @ ../node_modules/@hediet/typed-json-rpc-websocket/dist/index.js
 @ ./src/Server.ts
 @ ./src/extension.ts

WARNING in ./node_modules/ws/lib/validation.js
Module not found: Error: Can't resolve 'utf-8-validate' in '/Users/laike9m/Dev/VSC/vscode-debug-visualizer/extension/node_modules/ws/lib'
 @ ./node_modules/ws/lib/validation.js
 @ ./node_modules/ws/lib/receiver.js
 @ ./node_modules/ws/index.js
 @ ./src/Server.ts
 @ ./src/extension.ts

WARNING in ../node_modules/ws/lib/validation.js
Module not found: Error: Can't resolve 'utf-8-validate' in '/Users/laike9m/Dev/VSC/vscode-debug-visualizer/node_modules/ws/lib'
 @ ../node_modules/ws/lib/validation.js
 @ ../node_modules/ws/lib/receiver.js
 @ ../node_modules/ws/index.js
 @ ../node_modules/isomorphic-ws/node.js
 @ ../node_modules/@hediet/typed-json-rpc-websocket/dist/index.js
 @ ./src/Server.ts
 @ ./src/extension.ts

ERROR in ../node_modules/chokidar/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)
 @ ../node_modules/chokidar/node_modules/fsevents/fsevents.js 13:15-41
 @ ../node_modules/chokidar/lib/fsevents-handler.js
 @ ../node_modules/chokidar/index.js
 @ ../node_modules/@hediet/node-reload/dist/HotReloadService.js
 @ ../node_modules/@hediet/node-reload/dist/hotRequire.js
 @ ../node_modules/@hediet/node-reload/dist/index.js
 @ ./src/extension.ts
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 2
Command: /usr/local/Cellar/node/14.3.0/bin/node
Arguments: /usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js build
Directory: /Users/laike9m/Dev/VSC/vscode-debug-visualizer/extension
Output:

info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Did some search, seems to be related to this issue:
fsevents get error "Module parse failed: Unexpected character '�' (1:0)".

Any ideas how I should proceed?

System information

Version: 1.45.1
Commit: 5763d909d5f12fe19f215cbfdd29a91c0fa9208a
Date: 2020-05-14T08:33:47.663Z
Electron: 7.2.4
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.4.0
@laike9m laike9m changed the title "Module parse failed: Unexpected character" when running yarn build "Module parse failed: Unexpected character" when running yarn build May 24, 2020
@laike9m laike9m changed the title "Module parse failed: Unexpected character" when running yarn build "Module parse failed: Unexpected character" when running yarn build May 24, 2020
@hediet
Copy link
Owner

hediet commented May 24, 2020

I'll have a look at it tomorrow!

@laike9m
Copy link
Author

laike9m commented May 24, 2020

Thanks!

@hediet
Copy link
Owner

hediet commented May 26, 2020

Fixed now.

@hediet hediet closed this as completed May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants