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

Cannot find module 'XXX/../package.json' #61

Open
webrsb opened this issue Apr 1, 2024 · 2 comments
Open

Cannot find module 'XXX/../package.json' #61

webrsb opened this issue Apr 1, 2024 · 2 comments

Comments

@webrsb
Copy link

webrsb commented Apr 1, 2024

I try to bundle with webpack and show this error:

uncaught Error Error: Cannot find module 'XXX/../package.json'
    at webpackEmptyContext (XXX\main.js:71350:10)
    at eval (repl:1:26)

It seen webpack don't bundle directory.

export const version: string = require(`${__dirname}/../package.json`).version;

Is it really needed?
Thanks.

@Shashank3736
Copy link
Owner

Nope it's not needed I just added this at the start of the project to allow people access to the version of captcha module they are using. Thank you for reporting this.

@Shashank3736
Copy link
Owner

Removed the version const from the module now... in v3.2.2

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

2 participants