fleetbase / fleetbase/ember-ui

Windows path issue in treeForIntlTelInput causes duplicated build/js path

Open Beginner friendly
#128 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
10
Forks
25
Avg merge
1d 20h
Merged PRs (30d)
28

Description

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

Contributor guide

Open the contributing guide

Research direction

Search the codebase for treeForIntlTelInput and inspect how require.resolve('intl-tel-input') is converted into the package path. Reproduce the extension build on Windows or verify the path handling against Windows separators, then confirm the generated path contains build/js only once and the build succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.