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

[Webpack Issue] The path resolve problem in build stage #92

Closed
whats2000 opened this issue Sep 18, 2024 · 2 comments
Closed

[Webpack Issue] The path resolve problem in build stage #92

whats2000 opened this issue Sep 18, 2024 · 2 comments

Comments

@whats2000
Copy link

whats2000 commented Sep 18, 2024

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
image

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

@LoneRifle
Copy link
Collaborator

Please try this with v0.2.0 of this package, which removes the dependency on node-specific libs, including path.

@LoneRifle
Copy link
Collaborator

I'll just track this via #76 for now.

Duplicate of #76

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