Hi,
I am trying to build Brave on my Mac (Sonoma) and I am running into problem in the npm run build release
step.
Specifically, I am following the steps outlined in https://github.com/brave/brave-browser on a release-version of brave checked out and not altered in any way.
I ran into multiple problems with nodes modules not being installed correctly, which I was able to fix. Now, the problem is the following:
~/b/src/brave ◈ v1.61.109 ± npm run build release
> [email protected] build
> node ./build/commands/scripts/commands.js build
touch overridden files...
touch original files overridden by chromium_src...
...touch original files overridden by chromium_src done
touch original vector icon files overridden by brave/vector_icons...
...touch original vector icon files overridden by brave/vector_icons done
...touch overridden files done
update branding...
Recursing through GRD to find GRDP files...
Done recursing through GRD to find GRDP files.
...update branding done
generate ninja files...
Widevine cdm host verification is disabled
...generate ninja files done
build brave (id=a2ebb3a2-43c7-4a96-a629-c1a342571dfa)...
ninja brave Component...
----------------------------------------------------------------------------------------------------------------------------------------
/Users/me/b/src
> autoninja -C /Users/me/b/src/out/Component_arm64 brave -k 1 --offline
ninja: Entering directory `/Users/me/b/src/out/Component_arm64'
[4/43027] ACTION //brave/components/brave_adblock_ui/adblock_internals:brave_adblock_internals_ui(//build/toolchain/mac:clang_arm64)
FAILED: gen/brave/web-ui-brave_adblock_internals/brave_adblock_internals.grd
python3 ../../brave/script/transpile-web-ui.py --output_path=gen/brave/web-ui-brave_adblock_internals --root_gen_dir=/Users/me/b/src/out/Component_arm64/gen --grd_name=brave_adblock_internals.grd --resource_name=brave_adblock_internals --depfile_path=/Users/me/b/src/out/Component_arm64/gen/brave/components/brave_adblock_ui/adblock_internals/brave_adblock_internals_ui.d --webpack_alias=chromeapp --entry=brave_adblock_internals=/Users/me/b/src/brave/components/brave_adblock_ui/adblock_internals/brave_adblock_internals.tsx
> [email protected] web-ui
> webpack --config components/webpack/webpack.config.js --colors --mode=development --webpack_alias=chromeapp brave_adblock_internals=/Users/me/b/src/brave/components/brave_adblock_ui/adblock_internals/brave_adblock_internals.tsx
Hash: 27e74e8f6ce60f8c9e4f
Version: webpack 4.46.0
Time: 7797ms
Built at: 02/02/2024 11:40:34 AM
Asset Size Chunks Chunk Names
brave_adblock_internals.bundle.js 2.31 MiB brave_adblock_internals [emitted] brave_adblock_internals
Entrypoint brave_adblock_internals = brave_adblock_internals.bundle.js
[./components/brave_adblock_ui/adblock_internals/brave_adblock_internals.tsx] ./components/brave_adblock_ui/adblock_internals/brave_adblock_internals.tsx + 7 modules 13.5 KiB {brave_adblock_internals} [built]
| ../out/Component_arm64/gen/ui/webui/resources/tsc/js/cr.js 4.51 KiB [built]
| ../out/Component_arm64/gen/ui/webui/resources/tsc/js/assert.js 1.26 KiB [built]
| ../out/Component_arm64/gen/ui/webui/resources/tsc/js/promise_resolver.js 1.28 KiB [built]
| + 5 hidden modules
+ 12 hidden modules
ERROR in ./node_modules/scheduler/cjs/scheduler.development.js 100:37
Module parse failed: Unexpected token (100:37)
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
|
| if (subscriber !== null && interaction.__count === 0) {
> subscriber.onInteractionS
@ ./node_modules/scheduler/index.js 6:19-60
@ ./node_modules/react-dom/cjs/react-dom.development.js
@ ./node_modules/react-dom/index.js
@ ./components/brave_adblock_ui/adblock_internals/brave_adblock_internals.tsx
The list continues and throws the same type of error multiple times. Anyhow, a recurring thing is the following error type:
ERROR in ./node_modules/scheduler/cjs/scheduler.development.js 100:37
Module parse failed: Unexpected token (100:37)
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
|
| if (subscriber !== null && interaction.__count === 0) {
> subscriber.onInteractionS
@ ./node_modules/scheduler/index.js 6:19-60
@ ./node_modules/react-dom/cjs/react-dom.development.js
@ ./node_modules/react-dom/index.js
@ ./components/brave_adblock_ui/adblock_internals/brave_adblock_internals.tsx
It seems that I need to configure webpack to handle *.tsx
files. Anyhow, I cam unsure about WHERE to configure this (i.e. in which file) and to WHAT to set WHICH parameters.
Anyhow here who might shed some light on this one?
Thanks in advance!