regna
February 18, 2024, 9:21pm
1
Hi! Has anyone seen this error when running npm i
inside the Babylon.js
repo?
src/utils.ts:66:19 - error TS2339: Property 'ScriptBaseUrl' does not exist on type 'typeof Tools'.
I’ve pulled the latest commit aeec5b9613b6d15942860ae6aba11b6792900b97
npm i
previously worked for me in October 2023
$ uname -a
Linux 2354d4e62581 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 GNU/Linux
$ node --version
v18.18.2
---
$ npm --version
10.2.4
Thanks for your help!
$ npm i
> @babylonjs/root@1.0.0 prepare
> ts-patch install -s && npm run build:tools && npm i @dev/build-tools -D && npm run build:assets && npm run build:test-tools
> @babylonjs/root@1.0.0 build:tools
> npm run build -w @dev/build-tools && npm run build -w eslint-plugin-babylonjs
> @dev/build-tools@1.0.0 build
> npm run compile
> @dev/build-tools@1.0.0 compile
> tsc -b tsconfig.build.json
> eslint-plugin-babylonjs@1.0.0 build
> tsc -b tsconfig.build.json
up to date, audited 2684 packages in 9s
332 packages are looking for funding
run `npm fund` for details
14 vulnerabilities (9 moderate, 5 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
> @babylonjs/root@1.0.0 build:assets
> build-tools -c pa --global
Babylon.js build tools
Command: pa
Processing assets from ./packages/**/*/src/**/*.+(png|jpg|jpeg|gif|svg|scss|css|html|json|fx)
> @babylonjs/root@1.0.0 build:test-tools
> npm run build -w @tools/test-tools
> @tools/test-tools@1.0.0 build
> npm run clean && npm run compile
> @tools/test-tools@1.0.0 clean
> rimraf dist && rimraf *.tsbuildinfo
> @tools/test-tools@1.0.0 compile
> tsc -b tsconfig.build.json
src/utils.ts:66:19 - error TS2339: Property 'ScriptBaseUrl' does not exist on type 'typeof Tools'.
66 BABYLON.Tools.ScriptBaseUrl = baseUrl;
~~~~~~~~~~~~~
src/visualizationUtils.ts:18:19 - error TS2339: Property 'ScriptBaseUrl' does not exist on type 'typeof Tools'.
18 BABYLON.Tools.ScriptBaseUrl = baseUrl;
~~~~~~~~~~~~~
Found 2 errors.
npm ERR! Lifecycle script `compile` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: @tools/test-tools@1.0.0
npm ERR! at location: /home/nonroot/app/packages/tools/testTools
npm ERR! Lifecycle script `build` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: @tools/test-tools@1.0.0
npm ERR! at location: /home/nonroot/app/packages/tools/testTools
npm ERR! code 1
npm ERR! path /home/nonroot/app
npm ERR! command failed
npm ERR! command sh -c ts-patch install -s && npm run build:tools && npm i @dev/build-tools -D && npm run build:assets && npm run build:test-tools
npm ERR! A complete log of this run can be found in: /home/nonroot/.npm/_logs/2024-02-18T20_52_58_739Z-debug-0.log
RaananW
February 19, 2024, 1:03pm
3
We used linux on all of our CI servers, and have never experienced that. It is also the first time I see it ever asked, and I wonder what could be the cause.
Just for me to follow on what you were doing - you already had the repo on an older commit. This was working. Now you pulled a new version, tried running npm i
, and that failed with this error.
It feels like the declaration file is not updated or doesn’t exist, for some reason. can you try the following - before running npm i
, run npm build:dev
and see if it builds correctly. Try npm i
then. If that didn’t work, try running npm run clean
and then npm i
.
The ScriptBaseUrl
. was recently added, it is possible that the test tools is referencing an older declaration file that is not updated on your system.
Let me know if that worked! if it didn’t, we will take it from there
regna
February 20, 2024, 6:26pm
4
Thank you, @RaananW ! It seems to work after running npm run build:dev
!
You’re right that I had a repo on an older commit, then pulled the newest version, tried running npm i
and got the initial error
`npm run build:dev`
npm run build:dev
> @babylonjs/root@1.0.0 build:dev
> npm run build:assets && npm run build:source && npm run build:declaration -w @tools/babylon-server
> @babylonjs/root@1.0.0 build:assets
> build-tools -c pa --global
Babylon.js build tools
Command: pa
Processing assets from ./packages/**/*/src/**/*.+(png|jpg|jpeg|gif|svg|scss|css|html|json|fx)
> @babylonjs/root@1.0.0 build:source
> tsc -b ./tsconfig.devpackages.json
> @tools/babylon-server@1.0.0 build:declaration
> build-tools -c pud --config ./declarationConfigDev.json
Babylon.js build tools
Command: pud
IPhysicsEnginePlugin as IPhysicsEnginePluginV1
IPhysicsEnginePlugin as IPhysicsEnginePluginV1
IPhysicsEnginePlugin as IPhysicsEnginePluginV1
aliasing PhysicsEngine as PhysicsEngineV2
declaration file generated [ '@dev/core' ]
aliasing TouchHolographicButton as TouchHolographicButtonV3
declaration file generated [ '@dev/gui' ]
IGLTFLoaderExtension as IGLTFBaseLoaderExtension
declaration file generated [ '@dev/loaders' ]
declaration file generated [ '@dev/inspector' ]
declaration file generated [ '@tools/node-editor' ]
declaration file generated [ '@tools/node-geometry-editor' ]
declaration file generated [ '@tools/gui-editor' ]
declaration file generated [ '@dev/serializers' ]
declaration file generated [ '@dev/materials' ]
declaration file generated [ '@dev/post-processes' ]
declaration file generated [ '@dev/procedural-textures' ]
npm notice
npm notice New minor version of npm available! 10.2.4 -> 10.4.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.4.0
npm notice Run npm install -g npm@10.4.0 to update!
npm notice
`npm i`
npm i
> @babylonjs/root@1.0.0 prepare
> ts-patch install -s && npm run build:tools && npm i @dev/build-tools -D && npm run build:assets && npm run build:test-tools
> @babylonjs/root@1.0.0 build:tools
> npm run build -w @dev/build-tools && npm run build -w eslint-plugin-babylonjs
> @dev/build-tools@1.0.0 build
> npm run compile
> @dev/build-tools@1.0.0 compile
> tsc -b tsconfig.build.json
> eslint-plugin-babylonjs@1.0.0 build
> tsc -b tsconfig.build.json
up to date, audited 2684 packages in 8s
332 packages are looking for funding
run `npm fund` for details
11 vulnerabilities (9 moderate, 2 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
> @babylonjs/root@1.0.0 build:assets
> build-tools -c pa --global
Babylon.js build tools
Command: pa
Processing assets from ./packages/**/*/src/**/*.+(png|jpg|jpeg|gif|svg|scss|css|html|json|fx)
> @babylonjs/root@1.0.0 build:test-tools
> npm run build -w @tools/test-tools
> @tools/test-tools@1.0.0 build
> npm run clean && npm run compile
> @tools/test-tools@1.0.0 clean
> rimraf dist && rimraf *.tsbuildinfo
> @tools/test-tools@1.0.0 compile
> tsc -b tsconfig.build.json
> @tools/test-tools@1.0.0 postcompile
> node scripts/copyDeclaration.js
up to date, audited 2684 packages in 39s
332 packages are looking for funding
run `npm fund` for details
11 vulnerabilities (9 moderate, 2 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.