Windows path issue in treeForIntlTelInput causes duplicated build/js path
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- javascript, node.js
- Domain
- build-system
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.
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
- Dominant language
- JavaScript
- Stars
- 11
- Forks
- 25
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 28
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fleetbase/ember-ui
-
KZT currency support Open
Difficulty 1/5 Under an hour Newbie friendliness 45/100
All issues in fleetbase/ember-ui
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·