-
Notifications
You must be signed in to change notification settings - Fork 742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 BUG: "can't use ".." to break out of starting directory" when using Service Bindings in monorepo #4721
Comments
Hey! 👋 I'm planning to add a |
@mrbbot We have the same error, setting script: await readFile(scriptPath, "utf-8"),
scriptPath: "./index.mjs" // doesn't exist |
@hansottowirtz Hmmm, setting just |
It doesn't work when setting This is the error (same regardless of whether we're adding
|
@mrbbot did you have the chance to look at it? |
Hey! Thanks for the ping. I haven't yet, will try look at this in the next week. 👍 |
Hey! 👋 Put up a PR to fix this. In the meantime seems like this isn't a problem if you const mf = new Miniflare({
modules: true,
modulesRoot: path.resolve(".."),
scriptPath: path.resolve("../worker.mjs"),
}); |
Hey! Thanks for looking into it, it works well this way 👍 |
Which Cloudflare product(s) does this pertain to?
Miniflare
What version(s) of the tool(s) are you using?
3.20231218.1 [miniflare]
What version of Node are you using?
20
What operating system are you using?
Mac
Describe the Bug
I'm attempting to use Miniflare to run one app (app-2) with a second app (app-1) as a Service Binding. The docs are a little thin here, so I'm not sure if I'm defining the workers in the correct way.
In doing this I'm getting the error:
Notably:
can't use ".." to break out of starting directory
I've tried various other approaches (eg. importing a Miniflare instance from
app-2
and calling it programatcally), but it results in the same error. It feels like I'm battling against the framework here for what I imagine is a common project structure.Cheers 🍺
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response
The text was updated successfully, but these errors were encountered: