-
Notifications
You must be signed in to change notification settings - Fork 30
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
IITM Throws Error When an NPM Package is Not Installed in the Root Folder #97
Comments
I'm currently looking into this! Related: |
@timfish Thank you for responding promptly. Looking forward to your updates. |
As Prisma is CJS, I think this is fixed by #96 but I need to confirm. |
Hello @timfish I just used the latest version 1.8.1, but the issue still persists. I am now encountering the following error:
|
A warning is logged to the console but it no longer throws. #108 actually fixes the prisma issue |
@timfish, could you please let me know when the fix is released? Thank you. |
I am encountering an issue while using prisma module in my test folder along with the import-in-the-middle. When attempting to import the prisma module from a subdirectory, I receive the following error:
This occurs when I install and use the prisma package in a subdirectory. Notably, the issue only arises with Node.js version 18.19 and above. Versions 18 and below do not exhibit this problem. Additionally, the issue does not occur when the import-in-the-middle hook is not used.
If I add the prismato the root package.json, the error does not occur. However, due to project compliance, I am not allowed to include the the package in the root directory.
Expected Behavior
The prisma package should be successfully imported and executed without errors.
When I run the command
node --loader ./hook.mjs packages/a/test/prisma/app.mjs
it should not throw any error.Actual Behavior
The error Cannot find module '.prisma/client/default' is thrown.
Steps to Reproduce the Problem
npm i
.cd packages/a/test/prisma/
npm i
within this directory.cd ../../../../
node --loader ./hook.mjs packages/a/test/prisma/app.mjs
or
node --import ./register packages/a/test/prisma/app.mjs
both are throwing errors.
Specifications
The text was updated successfully, but these errors were encountered: