Skip to content

[TRI-699] using pathToFileURL on path used in detectPagesOrAppDir - #194

Merged
ericallam merged 4 commits into
triggerdotdev:mainfrom
dylanrod21:main
Jul 20, 2023
Merged

ericallam merged 4 commits into
triggerdotdev:mainfrom
dylanrod21:main

Conversation

@dylanrod21

Copy link
Copy Markdown
Contributor

fixes #190
/claim #190

Changes Made

  1. I followed the instructions to setup trigger.dev in my local NextJS app pointing to my local trigger.dev fork and reproduced the error.
  2. I traced the code and found the location of the path causing the issue.
  3. I added url from npm to use pathToFileURL to convert the path to one that would be valid on windows.

Testing

  1. I spun up the trigger.dev app locally
  2. I created a new NextJS app locally
  3. I ran the init command in the cli from my updated code for the cli in my local Next app and confirmed that the installation no longer aborted due to path issues

@changeset-bot

changeset-bot Bot commented Jul 19, 2023 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2f1b2a3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@trigger.dev/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dylanrod21 dylanrod21 changed the title using pathToFileURL on path used in detectPagesOrAppDir [TRI-699] using pathToFileURL on path used in detectPagesOrAppDir Jul 19, 2023
@ericallam

Copy link
Copy Markdown
Member

This looks great! About to test to make sure it still works on macOS but in the meantime could you add a changeset to this PR by running this in the root:

pnpm run changeset:add

Then follow the prompts to select a "patch" bump, like so:

CleanShot.2023-07-20.at.09.23.14.mp4

@ericallam
ericallam merged commit d07cfe8 into triggerdotdev:main Jul 20, 2023
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.

[TRI-699] The CLI init command fails on Windows because of file:// paths

2 participants