Contributing: first time build error of 'Tried to set an option (xxx) that was not declared.' and 'TypeError: app.expandInputFiles is not a function'

I forked and cloned the repo, and then followed instructions on Start Contributing to Babylon.js | Babylon.js Documentation. When I reach to ‘npm run build’ from , it gave me this Error:

Built at: 12/18/2021 12:02:42 PM
Asset Size Chunks Chunk Names
babylon.ktx2Decoder.js 24.6 KiB 0 [emitted] main
Entrypoint main = babylon.ktx2Decoder.js
[12:02:42] Finished ‘ktx2Decoder:buildMin’ after 1.46 s
[12:02:42] Finished ‘ktx2Decoder’ after 1.46 s
[12:02:42] Finished ‘typescript-apps’ after 17 s
[12:02:42] Starting ‘netlify-cleanup’…
[12:02:42] Finished ‘netlify-cleanup’ after 396 μs
[12:02:42] Finished ‘typescript-all’ after 7.88 min
[12:02:42] Finished ‘documentation’ after 17 ms
[12:02:42] Starting ‘typedoc-all’…
[12:02:42] Starting ‘typedoc-generate’…
[12:02:43] Tried to set an option (mode) that was not declared.
[12:02:43] Tried to set an option (module) that was not declared.
[12:02:43] Tried to set an option (target) that was not declared.
[12:02:43] Tried to set an option (includeDeclarations) that was not declared.
[12:02:43] Tried to set an option (ignoreCompilerErrors) that was not declared.
[12:02:43] Tried to set an option (entryPoint) that was not declared.
[12:02:43] ‘typedoc-generate’ errored after 867 ms
[12:02:43] TypeError: app.expandInputFiles is not a function
at Stream. (C:\xxx\Babylon.js\node_modules\gulp-typedoc\index.js:62:21)
** at _end (C:\Users\sunny\CoolShits\Babylon.js\node_modules\through\index.js:65:9)**
** at Stream.stream.end (C:\xxx\Babylon.js\node_modules\through\index.js:74:5)**
** at DestroyableTransform.onend (C:\xxx\Babylon.js\Tools\Gulp\node_modules\readable-stream\lib_stream_readable.js:577:10)**
** at Object.onceWrapper (events.js:421:28)**
** at DestroyableTransform.emit (events.js:327:22)**
** at DestroyableTransform.EventEmitter.emit (domain.js:506:15)**
** at endReadableNT (C:\xxx\Babylon.js\Tools\Gulp\node_modules\readable-stream\lib_stream_readable.js:1010:12)**
** at processTicksAndRejections (internal/process/task_queues.js:84:21)**
[12:02:43] ‘typedoc-all’ errored after 870 ms
[12:02:43] ‘default’ errored after 8.42 min
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! babylonjs-gulp@0.0.0 build: gulp --max-old-space-size=8192 --tsLintFix=true
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the babylonjs-gulp@0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\xxx\AppData\Roaming\npm-cache_logs\2021-12-18T20_02_44_045Z-debug.log

my code is as fresh as Dec 17.

dependency versions:
node -v: v12.18.3
npm -v: 6.14.15
npm list gulp: `-- gulp@4.0.2

Did you well run npm install from the tools/gulp folder, not from the root ?

Also, if you are not creating a full build locally, you can bypass npm run build and only use npm start but this is really strange that typedoc is failing knowing you should be using the same version that us (in the lock file)

I initially installed from the root, then I realized that, so I cd to Tools/Gulp and did npm install again. And the error result is after I installed from Tools/Gulp.

When I npm install, it always showed me that it ‘found xx vulnerabilities’. Then I ran ‘npm audit fix’ to fix them - hope that doesn’t make any difference.

Also, each time I npm installed, and then I did ‘git status’, it showed that ‘…/…/package-lock.json’ and ‘…/…/package.json’ were modified. Is that expected too?

Could you try again on a fresh clone without the audit fix and from the tools/gulp folder to see ?

Sure! This time it also failed but it complains about Firefox. I didn’t install Firefox, so I guess that’s the reason!

[10:28:19]

Baseline size for engineOnly is 185458 bytes.
[10:28:19] Baseline size for sceneOnly is 463846 bytes.
[10:28:19] Baseline size for minGridMaterial is 796991 bytes.
[10:28:19] Baseline size for minStandardMaterial is 978818 bytes.
[10:28:19] Save baseline
[10:28:19] Finished 'tests-es6Modules' after 12 s
[10:28:19] Finished 'deployAndTests-es6Modules' after 43 s
[10:28:19] Starting 'tests-validation-virtualscreen'...
20 12 2021 10:28:19.684:WARN [config]: urlRoot normalized to "/karma/"
20 12 2021 10:28:19.980:WARN [filelist]: Pattern "C:/xxx/Babylon.js/!./**/*.d.ts" does not match any file.
20 12 2021 10:28:19.980:WARN [filelist]: Pattern "C:/xxx/Babylon.js/favicon.ico" does not match any file.
20 12 2021 10:28:19.981:WARN [filelist]: Pattern "C:/xxx/Babylon.js/assets/**/*" does not match any file.
20 12 2021 10:28:21.794:INFO [karma-server]: Karma v5.2.3 server started at http://localhost:3000/karma/
20 12 2021 10:28:21.795:INFO [launcher]: Launching browsers Firefox with concurrency 1
20 12 2021 10:28:21.799:INFO [launcher]: Starting browser Firefox
20 12 2021 10:33:21.808:WARN [launcher]: Firefox have not captured in 300000 ms, killing.
20 12 2021 10:33:23.819:WARN [launcher]: Firefox was not killed in 2000 ms, sending SIGKILL.
20 12 2021 10:33:25.829:WARN [launcher]: Firefox was not killed by SIGKILL in 2000 ms, continuing.
[10:33:25] 'tests-validation-virtualscreen' errored after 5.1 min
[10:33:25] Error: 1
    at formatError (C:\xxx\Babylon.js\Tools\Gulp\node_modules\gulp\node_modules\gulp-cli\lib\versioned\^4.0.0\format-error.js:21:10)      
    at Gulp.<anonymous> (C:\xxx\Babylon.js\Tools\Gulp\node_modules\gulp\node_modules\gulp-cli\lib\versioned\^4.0.0\log\events.js:33:15)   
    at Gulp.emit (events.js:327:22)
    at Gulp.EventEmitter.emit (domain.js:483:12)
    at Object.error (C:\xxx\Babylon.js\Tools\Gulp\node_modules\undertaker\lib\helpers\createExtensions.js:61:10)
    at handler (C:\xxx\Babylon.js\Tools\Gulp\node_modules\now-and-later\lib\mapSeries.js:47:14)
    at f (C:\xxx\Babylon.js\Tools\Gulp\node_modules\once\once.js:25:25)
    at f (C:\xxx\Babylon.js\Tools\Gulp\node_modules\once\once.js:25:25)
    at tryCatch (C:\xxx\Babylon.js\Tools\Gulp\node_modules\async-done\index.js:24:15)
    at done (C:\xxx\Babylon.js\Tools\Gulp\node_modules\async-done\index.js:40:12)
    at removeAllListeners (C:\xxx\Babylon.js\node_modules\karma\lib\server.js:402:11)
    at C:\xxx\Babylon.js\node_modules\karma\lib\server.js:409:11
    at Server.close (net.js:1601:9)
    at Object.onceWrapper (events.js:421:28)
    at Server.emit (events.js:327:22)
    at Server.EventEmitter.emit (domain.js:506:15)

yup it is used for our test automation.

good part is when you are here, you are on the latest step on the process so everything is good.

This time it built successfully! Thanks!

So if I don’t need to build and test the whole repo, but just need to test my own change, I should just run ‘npm start’, that correct?

yup it is enough to run the playground locally for instance: http://localhost:1338/Playground/index-local.html?#G1Q1XM#1

1 Like