Shashank3736/captcha-canvas

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

webrsb opened this issue · 2 comments

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.

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.

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