0x80 / isolate-package

Isolate a monorepo package with its internal dependencies to form a self-contained directory with a pruned lockfile
MIT License
125 stars 13 forks source link

trouble shooting some problems #72

Closed kevpie closed 6 months ago

kevpie commented 6 months ago

package '@repo/backend' has conflicts in the following paths: /Users/kevin/foo/packages/backend /Users/kevin/foo/apps/gen2/isolate/packages/backend

Struggling with logging/debugging

Do I need to manually delete the isolate folder before each call to isolate?

PNPM used partially and then NPM used to pack...

$ npx isolate
debug Using isolate-package version 1.13.2
debug Found tsconfig at: ./tsconfig.json
debug Workspace root resolved to /Users/kevin/foo
debug Isolate target package (root)/apps/gen2
debug Isolate output directory (root)/apps/gen2/isolate
debug Detected package manager pnpm 8.15.7
debug Detected pnpm packages globs: [ 'apps/*', 'packages/*', 'services/*' ]
debug Registering package ./apps/gen2
debug Registering package ./packages/typescript-config
debug Registering package ./packages/firebase-admin
debug Registering package ./packages/eslint-config
debug Registering package ./packages/connectrpc
debug Registering package ./packages/common
debug Registering package ./packages/backend
debug Using PNPM pack instead of NPM pack
debug Packed (temp)/repo-backend-0.0.0.tgz
debug Packed (temp)/repo-common-0.0.0.tgz
debug Unpacking (temp)/repo-backend-0.0.0.tgz
debug Unpacking (temp)/repo-common-0.0.0.tgz
debug Moved package files to (isolate)/packages/common
debug Moved package files to (isolate)/packages/backend
Error: Command failed: npm pack --pack-destination "/Users/kevin/foo/apps/gen2/isolate/__tmp"

    at ChildProcess.exithandler (node:child_process:422:12)
    at ChildProcess.emit (node:events:517:28)
    at maybeClose (node:internal/child_process:1098:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:303:5)

Declared using pnpm but then uses npm pack.

Trying to introduce into firebase monorepo, but need to keep the firebase.json at the root and use codebase for different functions services.

0x80 commented 6 months ago

@kevpie Thanks for bringing this under my attention. The part with npm was definitely a bug, and I have addressed it in #74

I have published 1.14.0-0 under the next tag, so you can install it with pnpm add isolate-package@next -D

I don't have time to test it right now, so please give it a try and let me know if it works.

Any existing isolate directory is cleared at the start of the process, so no need to manually remove it. Keeping the firebase.json in the root is not something I have tested myself, but it should be no problem, as it is mainly a matter of pointing source to the correct location.

kevpie commented 6 months ago

Thank you!

I hope to start working again on this soon. I really appreciate your efforts around this challenge in the Firebase ecosystem.

On Thu, Apr 18, 2024 at 12:19 PM Thijs Koerselman @.***> wrote:

@kevpie https://github.com/kevpie Thanks for bringing this under my attention. The part with npm was definitely a bug, and I have addressed it in #73 https://github.com/0x80/isolate-package/issues/73

I have published 1.14.0-0 under the next tag, so you can install it with pnpm add @.*** -D

I don't have time to test it right now, so please give it a try and let me know if it works.

Any existing isolate directory is cleared at the start of the process, so no need to manually remove it. Keeping the firebase.json in the root is not something I have tested myself, but it should be no problem, as it is mainly a matter of pointing source to the correct location.

— Reply to this email directly, view it on GitHub https://github.com/0x80/isolate-package/issues/72#issuecomment-2064199502, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABH5GW222Z37ACVJKUI4XDY57P6XAVCNFSM6AAAAABGLQ7UPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRUGE4TSNJQGI . You are receiving this because you were mentioned.Message ID: @.***>

-- Kevin Pierce @.*** 717-1341

0x80 commented 6 months ago

I'm going to assume this is solved. Feel free to reopen if you have more info.