When running Fleetbase Console on Windows, the Extension Build System fails with:
Directory not found:
node_modules\intl-tel-input\build\js\build\js
The issue appears to come from this code:
const intlTelInputPath = path
.dirname(require.resolve('intl-tel-input'))
.replace(/build/js$/, '');
On Windows, require.resolve() returns paths using backslashes:
...\intl-tel-input\build\js
So the regex /build/js$/ does not match, causing the path to become:
...\build\js\build\js
Suggested fix:
.replace(/[\/]build[\/]js$/, '')
Or more robust:
const intlTelInputPath = path.resolve(
path.dirname(require.resolve('intl-tel-input')),
'../..'
);
Environment:
Windows 11
Node 20.19.x
Yarn 1.22.x
Fleetbase Console 0.7.38
When running Fleetbase Console on Windows, the Extension Build System fails with:
Directory not found:
node_modules\intl-tel-input\build\js\build\js
The issue appears to come from this code:
const intlTelInputPath = path
.dirname(require.resolve('intl-tel-input'))
.replace(/build/js$/, '');
On Windows, require.resolve() returns paths using backslashes:
...\intl-tel-input\build\js
So the regex /build/js$/ does not match, causing the path to become:
...\build\js\build\js
Suggested fix:
.replace(/[\/]build[\/]js$/, '')
Or more robust:
const intlTelInputPath = path.resolve(
path.dirname(require.resolve('intl-tel-input')),
'../..'
);
Environment:
Windows 11
Node 20.19.x
Yarn 1.22.x
Fleetbase Console 0.7.38