Skip to content

Latest commit to loadProjectConfig.js causes windows config file name to be converted to a url twice #1107

Closed
@DaveWelling

Description

@DaveWelling

Describe the bug

This contains a call to _nodeUrl.default.pathToFileURL(configFilePath) which duplicates a call in discoverConfigFilePath line 19 for windows machines.
https://github.com/callstack/repack/blame/main/packages/repack/src/commands/common/config/loadProjectConfig.ts

This results in the config file path being converted to a URL twice.

System Info

System:
  OS: Windows 10 10.0.19045
  CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
  Memory: 31.27 GB / 63.92 GB
Binaries:
  Node:
    version: 23.6.0
    path: C:\nvm4w\nodejs\node.EXE
  Yarn:
    version: 1.22.5
    path: C:\Program Files (x86)\Yarn\bin\yarn.CMD
  npm:
    version: 10.9.2
    path: C:\nvm4w\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK: Not Found
IDEs:
  Android Studio: Not Found
  Visual Studio: Not Found
Languages:
  Java: 17.0.13
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 19.0.0
    wanted: 19.0.0
  react-native:
    installed: 0.78.1
    wanted: 0.78.1
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Re.Pack Version

5.0.5

Reproduction

https://github.com/callstack/repack/issues

Steps to reproduce

Just try to build with any windows machine and an es module config file (.mjs)

Metadata

Metadata

Assignees

Labels

status:confirmedThe issue has been reviewed and all necessary information is provided.type:bugA bug report.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions