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

macOS bundle error: need an appropriate loader to handle this file type #204

Closed
pinxue opened this issue Jan 5, 2025 · 5 comments
Closed
Labels
question Further information is requested

Comments

@pinxue
Copy link

pinxue commented Jan 5, 2025

Environment

Source: Latest main stream

OS: macOS 15.2 (24C101) (Apple Silicon)

node.js: v20.12.2

npm: 10.5.0

npm registry: https://registry.npmmirror.com

Output:

 void git:(main)$ npm run gulp vscode-darwin-arm64

> void-dev@1.94.0 gulp
> node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js vscode-darwin-arm64

[11:32:13] Using gulpfile ~/study/void/gulpfile.js
[11:32:13] Starting 'vscode-darwin-arm64'...
[11:32:13] Starting clean-out-build ...
[11:32:13] Finished clean-out-build after 2 ms
[11:32:13] Starting build-web-node-paths ...
[11:32:13] Finished build-web-node-paths after 2 ms
[11:32:13] Starting build-date-file ...
[11:32:13] Finished build-date-file after 0 ms
[11:32:13] Starting set-amd ...
Setting build to AMD: false
[11:32:13] Finished set-amd after 0 ms
[11:32:13] Starting compile-api-proposal-names ...
[11:32:13] Starting compilation api-proposal-names...
[11:32:13] Finished compilation api-proposal-names with 0 errors after 48 ms
[11:32:13] Finished compile-api-proposal-names after 54 ms
[11:32:13] Starting compile-src ...
[11:32:22] [mangler] Done collecting. Classes: 8111. Exported symbols: 9846
[11:32:23] [mangler] Done creating class replacements
[11:32:23] [mangler] Starting prepare rename edits
[11:32:23] Starting compilation...
[12:12:29] [mangler] Done preparing edits: 4002 files
[12:12:33] [mangler] Done: 4992.863kb saved, memory-usage: {"total_heap_size":2967748608,"total_heap_size_executable":10010624,"total_physical_size":2966536192,"total_available_size":5715596880,"used_heap_size":2871052656,"heap_size_limit":8640266240,"malloced_memory":1089640,"peak_malloced_memory":20260864,"does_zap_garbage":0,"number_of_native_contexts":2,"number_of_detached_contexts":0,"total_global_handles_size":4882432,"used_global_handles_size":1919136,"external_memory":121536922}
[12:14:39] Finished compilation with 0 errors after 2535840 ms
[12:14:39] Finished compile-src after 2546340 ms
[12:14:39] Starting compile-build ...
[12:14:39] Finished compile-build after 7 ms
[12:14:39] Starting clean-extensions-build ...
[12:14:39] Finished clean-extensions-build after 1 ms
[12:14:39] Starting bundle-marketplace-extensions-build ...
[12:14:39] Finished bundle-marketplace-extensions-build after 2 ms
[12:14:39] Starting bundle-extensions-build ...
[12:15:04] Bundled extension: simple-browser/extension.webpack.config.js...
[12:15:04] Bundled extension: search-result/extension.webpack.config.js...
[12:15:05] Bundled extension: jake/extension.webpack.config.js...
[12:15:05] Bundled extension: grunt/extension.webpack.config.js...
[12:15:05] Bundled extension: debug-auto-launch/extension.webpack.config.js...
[12:15:05] Bundled extension: gulp/extension.webpack.config.js...
[12:15:05] Bundled extension: debug-server-ready/extension.webpack.config.js...
[12:15:06] Bundled extension: tunnel-forwarding/extension.webpack.config.js...
[12:15:07] Bundled extension: references-view/extension.webpack.config.js...
[12:15:08] Bundled extension: git-base/extension.webpack.config.js...
[12:15:08] Bundled extension: media-preview/extension.webpack.config.js...
[12:15:08] Bundled extension: markdown-math/extension.webpack.config.js...
[12:15:14] Bundled extension: php-language-features/extension.webpack.config.js...
[12:15:14] Bundled extension: ipynb/extension.webpack.config.js...
[12:15:17] Bundled extension: extension-editing/extension.webpack.config.js...
[12:15:17] Bundled extension: emmet/extension.webpack.config.js...
[12:15:24] Bundled extension: merge-conflict/extension.webpack.config.js...
[12:15:25] Bundled extension: npm/extension.webpack.config.js...
[12:15:25] Bundled extension: github-authentication/extension.webpack.config.js...
[12:15:27] Bundled extension: css-language-features/extension.webpack.config.js...
[12:15:34] Bundled extension: typescript-language-features/extension.webpack.config.js...
[12:15:35] Bundled extension: git/extension.webpack.config.js...
[12:15:35] Bundled extension: configuration-editing/extension.webpack.config.js...
[12:15:35] 'vscode-darwin-arm64' errored after 43 min
[12:15:35] Error in plugin "webpack-stream"
Message:
    Module parse failed: Unexpected token (267:31)
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
|                               return JSON.parse(buffer.toString());
|                       } catch (err) {
>                               return Body.Promise.reject(
Details:
    domainEmitter: [object Object]
    domainThrown: false

PS. Building pass and ./scripts/code.sh works fine.

@jcommaret
Copy link
Contributor

jcommaret commented Jan 5, 2025

Your node version is not the recommended one.

Check the recommended node version :
-> https://github.com/voideditor/void/blob/main/.nvmrc

Update to this version using your node version managing software.
-> Actually this is the 20.16.0

We will have to update it to a more recent one as well, but there might be side effects to stabilise it so go with the 20.16.0

@andrewpareles andrewpareles added the question Further information is requested label Jan 9, 2025
@pinxue
Copy link
Author

pinxue commented Jan 9, 2025

Your node version is not the recommended one.

Check the recommended node version : -> https://github.com/voideditor/void/blob/main/.nvmrc

Update to this version using your node version managing software. -> Actually this is the 20.16.0

We will have to update it to a more recent one as well, but there might be side effects to stabilise it so go with the 20.16.0

Just tried with 20.16.0 newly installed by nvm from scratch (rm -rf node_modules out* && git checkout -f), got a few steps forward then same error.

According the message, I guess there is some loader missing from my env, maybe in global config? Unfortunately the error message didn't reveal the file extension.

[main 2025-01-08T11:20:58.092Z] update#setState checking for updates
[main 2025-01-08T11:20:58.916Z] update#setState idle
[20:06:28] Finished compilation with 0 errors after 6654886 ms
[20:06:28] Finished compile-src after 6665536 ms
[20:06:28] Starting compile-build ...
[20:06:28] Finished compile-build after 7 ms
[20:06:28] Starting clean-extensions-build ...
[20:06:28] Finished clean-extensions-build after 56 ms
[20:06:28] Starting bundle-marketplace-extensions-build ...
[20:06:28] Finished bundle-marketplace-extensions-build after 3 ms
[20:06:28] Starting bundle-extensions-build ...
[20:06:51] Bundled extension: simple-browser/extension.webpack.config.js...
[20:06:51] Bundled extension: search-result/extension.webpack.config.js...
[20:06:51] Bundled extension: debug-server-ready/extension.webpack.config.js...
[20:06:51] Bundled extension: debug-auto-launch/extension.webpack.config.js...
[20:06:51] Bundled extension: grunt/extension.webpack.config.js...
[20:06:51] Bundled extension: gulp/extension.webpack.config.js...
[20:06:52] Bundled extension: jake/extension.webpack.config.js...
[20:06:52] Bundled extension: tunnel-forwarding/extension.webpack.config.js...
[20:06:54] Bundled extension: references-view/extension.webpack.config.js...
[20:06:54] Bundled extension: git-base/extension.webpack.config.js...
[20:06:54] Bundled extension: media-preview/extension.webpack.config.js...
[20:06:54] Bundled extension: markdown-math/extension.webpack.config.js...
[20:07:00] Bundled extension: php-language-features/extension.webpack.config.js...
[20:07:00] Bundled extension: ipynb/extension.webpack.config.js...
[20:07:04] Bundled extension: extension-editing/extension.webpack.config.js...
[20:07:04] Bundled extension: emmet/extension.webpack.config.js...
[20:07:13] Bundled extension: npm/extension.webpack.config.js...
[20:07:13] Bundled extension: merge-conflict/extension.webpack.config.js...
[20:07:13] Bundled extension: github-authentication/extension.webpack.config.js...
[20:07:15] Bundled extension: json-language-features/server/extension.webpack.config.js...
[20:07:15] Bundled extension: css-language-features/extension.webpack.config.js...
[20:07:16] Bundled extension: css-language-features/server/extension.webpack.config.js...
[20:07:18] Bundled extension: configuration-editing/extension.webpack.config.js...
[20:07:19] Bundled extension: typescript-language-features/extension.webpack.config.js...
[20:07:19] Bundled extension: html-language-features/server/extension.webpack.config.js...
[20:07:21] Bundled extension: git/extension.webpack.config.js...
[20:07:21] Bundled extension: html-language-features/extension.webpack.config.js...
[20:07:22] Bundled extension: json-language-features/extension.webpack.config.js...
[20:07:22] 'vscode-darwin-arm64' errored after 1.87 h
[20:07:22] Error in plugin "webpack-stream"
Message:
    Module parse failed: Unexpected token (267:31)
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
| 				return JSON.parse(buffer.toString());
| 			} catch (err) {
> 				return Body.Promise.reject(
Details:
    domainEmitter: [object Object]
    domainThrown: false

@jcommaret
Copy link
Contributor

How many time did you wait after launching npm run watch
This usually takes several minutes.

To make sure you have everything setup properly can you reclone the project from the start, then use the command is this following order :

npm install
npm run buildreact
npm run watch (wait for a few minutes, this could look like this has been finished but this is not the case until you see 3 [watch-client] at the end of the script.

Then check everything is working correctly by launching the interface ./scripts/code.sh

After you can see the editor launched, you can run the npm run gulp vscode-darwin-arm64

I just reclonded the project to make sure this is working, and this works really fine.

@pinxue
Copy link
Author

pinxue commented Jan 11, 2025

How many time did you wait after launching npm run watch This usually takes several minutes.

To make sure you have everything setup properly can you reclone the project from the start, then use the command is this following order :

npm install npm run buildreact npm run watch (wait for a few minutes, this could look like this has been finished but this is not the case until you see 3 [watch-client] at the end of the script.

Then check everything is working correctly by launching the interface ./scripts/code.sh

After you can see the editor launched, you can run the npm run gulp vscode-darwin-arm64

I just reclonded the project to make sure this is working, and this works really fine.

Thank you! You are right, I need reclone and start from beginning and got the .app.
I tried removed node_modules and out* then git checkout -f, then run in the workspace by waiting long enough, with watch in bg or ctrl-c, both resulting the error. Unfortunately I removed the previous dir, so sorry for cannot figure out whats wrong.

@pinxue pinxue closed this as completed Jan 11, 2025
@jcommaret
Copy link
Contributor

jcommaret commented Jan 11, 2025

@pinxue : the community is here for that. I wish you all the best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants