How can I make the JS imported using jiti use the current project's package.json? #17
Replies: 1 comment 1 reply
-
Hi. Would you be able to create a minimal reproduction? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to use
jiti
to load JS/TS files from any directory and I hope it can use the dependencies in my project.For example, I have introduced
jiti
as a dependency. Now I have a JS file:Now I use the following code to run this JS:
However, an error occurs when running:
Error: Cannot find module 'jiti'
.What should I do to run this JS file properly?
Beta Was this translation helpful? Give feedback.
All reactions