Skip to content

fix(packager): normalize Windows path separators in zip entries#180

Closed
ShubhamS2005 wants to merge 1 commit into
RocketChat:masterfrom
ShubhamS2005:Windows-rc-apps-deploy-fails
Closed

fix(packager): normalize Windows path separators in zip entries#180
ShubhamS2005 wants to merge 1 commit into
RocketChat:masterfrom
ShubhamS2005:Windows-rc-apps-deploy-fails

Conversation

@ShubhamS2005
Copy link
Copy Markdown
Contributor

@ShubhamS2005 ShubhamS2005 commented Mar 15, 2026

Fix: Windows deployment - normalize TypeScript import paths

Problem

When deploying Rocket.Chat Apps on Windows using rc-apps deploy, the packaging step fails with a TypeScript error:
File 'RoomPersistence.ts' not found.

  • The project compiles correctly with tsc.
  • Deploys fine on macOS.
  • The error occurs only when the main app entry imports additional modules.
  • Root cause: the CLI Language Service cannot resolve Windows-style \ paths during packaging.

Solution

  • Normalize all module paths in the packager to use POSIX-style / separators.
  • Ensures TypeScript can locate all source files on Windows.
  • Cross-platform safe: macOS and Linux deployments remain unaffected.
  • But this thing require CLI installation fails on Windows because package.json scripts use Unix rm command #179 to be done , as it give Cross-Platforem safe work with help of remref (in Windows):
  • "postpack": "rimraf oclif.manifest.json",
    "prepack": "rimraf lib && tsc && oclif-dev manifest && oclif-dev readme",
    "prepare": "rimraf lib && tsc",

Impact

  • Windows deployments now succeed even with additional module imports in the main app entry.
  • Deployment behavior is consistent across Windows, macOS, and Linux.

Testing

  • Verified packaging succeeds on Windows with module imports.
  • Verified macOS deployment continues to work as expected.

Related Issue

Screenshot 2026-03-15 223841

Final Result

Screenshot 2026-03-15 223552

@DavidChrstn
Copy link
Copy Markdown

DavidChrstn commented May 21, 2026

@d-gubert @rodrigok
Could you have a look on this?
Thanks :)

@d-gubert
Copy link
Copy Markdown
Member

Hi, this change has no effect in the processing, since the zip library we use already applies the same replace call.

The original issue is in the apps-compiler, solved here RocketChat/Rocket.Chat.Apps-compiler#69

I'll be closing this PR as a fix is already on the way. Thanks for looking into this!

@d-gubert d-gubert closed this May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: rc-apps deploy fails with File 'X.ts' not found while tsc compiles successfully

3 participants