[Webpack Issue] The path resolve problem in build stage
**Describe the bug**
This bug will trigger the following error at deployment time
```
[ERR_INVALID_ARG_TYPE]: The "paths[0]" argument must be of type string. Received type number (91100)
```
**To Reproduce**
Steps to reproduce the behavior:
1. Use webpack to build the project
2. Invoke the `pdf2md` function
3. See the error at the console
**Expected behavior**
The path dependence seems will break when using `webpack` to build the production, which the same code work smoothly at development mode
**Screenshots**

**Desktop (please complete the following information):**
- OS: Window
- VSCode
- Version 1.93.0
**Additional context**
Yes, seems like the path in the dependence really mass up, I have tried to mark it as `externals`, but sadly it does not work for me.
[Related Issue: Support Webpack, don't use require.resolve() #76](https://github.com/opengovsg/pdf2md/issues/76)
关闭于 2024-12-10 2 条评论