Skip to content
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

NextJS ENOENT: no such file or directory Error when trying to create Client #36

Open
thanvinhbaohoang opened this issue May 16, 2024 · 5 comments

Comments

@thanvinhbaohoang
Copy link

Description

When I try to initialize a new Client object, I get a no such file or directory
image

Expected Behavior

I expect it to run just like the provided example (which used Express instead of NextJS)

Actual Behavior

image

@AaronAtDuo
Copy link
Contributor

This looks very similar to the issues that came up in #26.

@thanvinhbaohoang What version of the library are you using?

@thanvinhbaohoang
Copy link
Author

@AaronAtDuo I tried this with v2.0.3 after checking the linked issue and its still giving me the same problem :(

@Fiontan
Copy link

Fiontan commented Jul 31, 2024

I've received a reply from duo from a noreply email stating that there is " an open feature request submitted to our Product team so that it can be considered during our next prioritization phase. I will go ahead and add you as an interested contact for this FR...". I cannot find a way to see existing feature requests so they may not be public.

@Fiontan
Copy link

Fiontan commented Jul 31, 2024

Looks similar to #21 and #5

@Adam-Schlichtmann
Copy link

Adam-Schlichtmann commented Aug 29, 2024

I was running into this using version 2.0.3.
I ended up adding this to my docker file to "mock" the package.json

RUN echo "{ \"version\": \"2.0.3\" }" > package.json

Make sure that the path to your package.json is back one directory from wherever you code is that is creating the Client.

You could also solve this using patch-package to remove this line from the constants.ts file

fs.readFileSync(path.join(__dirname, '../package.json'), { encoding: 'utf-8' })

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

No branches or pull requests

4 participants