You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am experiencing an issue while integrating @fileforge/pdfreader into my React project. After following the documentation and installing the package, I encountered a Webpack compilation error related to the missing process/browser module.
Error Details:
The following error occurs during the build process:
Additionally, I tried adding a polyfill for process in my Webpack configuration, but the error persists. The issue seems to be related to how the module is handled within @fileforge/pdfreader.
Steps to Reproduce:
Install @fileforge/pdfreader in a React project.
Attempt to import and use the component in the project.
Run the build using Webpack (or a React build tool like Create React App).
Expected Behavior:
The package should work without requiring a manual polyfill for Node.js modules like process.
Actual Behavior:
The build fails with the error above.
Environment:
OS: macOS
Node.js version: v20.18.0 | v22.7.0
Webpack version: 5.64.4
React version: 18.3.1
@fileforge/pdfreader version: 0.1.43
Attempts to Resolve:
I attempted to resolve the issue by:
Installing the process polyfill.
Modifying the Webpack configuration to include process/browser.
Ensuring that the paths are correctly set in the module resolution.
Despite these attempts, the error persists, suggesting a deeper issue with how @fileforge/pdfreader handles dependencies.
Request:
Could you provide guidance on how to resolve this error, or update the package to avoid requiring manual Node.js polyfills when used in a browser environment like React? If possible, an example of proper integration would also be very helpful.
Thank you for your time and assistance.
The text was updated successfully, but these errors were encountered:
Vite should handle bundling this gracefully, not sure why there are issues with Webpack specifically. It is likely being introduced by pdfjs-dist, but I can't really confirm at the moment.
I am experiencing an issue while integrating
@fileforge/pdfreader
into my React project. After following the documentation and installing the package, I encountered a Webpack compilation error related to the missingprocess/browser
module.Error Details:
![Screenshot 2024-10-18 at 12 50 19](https://private-user-images.githubusercontent.com/48992475/377822669-4c25d5a2-8704-4c52-bc22-1fb82f781991.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MDU0MzAsIm5iZiI6MTczOTUwNTEzMCwicGF0aCI6Ii80ODk5MjQ3NS8zNzc4MjI2NjktNGMyNWQ1YTItODcwNC00YzUyLWJjMjItMWZiODJmNzgxOTkxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDAzNTIxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMwZjdkYWI4NmQ1YzM0Nzc5NmJjOGYyMDljNjU5MmY3MzRkMjBjZTQ1YjI0MDc1YWFiMjhjNDU5Y2M0ZjU3M2EmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ha1G_QvZHECXtQ5klMSRxGX8xV8VshGnbuqRgasJLgU)
The following error occurs during the build process:
Additionally, I tried adding a polyfill for
process
in my Webpack configuration, but the error persists. The issue seems to be related to how the module is handled within@fileforge/pdfreader
.Steps to Reproduce:
@fileforge/pdfreader
in a React project.Expected Behavior:
The package should work without requiring a manual polyfill for Node.js modules like
process
.Actual Behavior:
The build fails with the error above.
Environment:
v20.18.0 | v22.7.0
5.64.4
18.3.1
0.1.43
Attempts to Resolve:
I attempted to resolve the issue by:
process
polyfill.process/browser
.Despite these attempts, the error persists, suggesting a deeper issue with how
@fileforge/pdfreader
handles dependencies.Request:
Could you provide guidance on how to resolve this error, or update the package to avoid requiring manual Node.js polyfills when used in a browser environment like React? If possible, an example of proper integration would also be very helpful.
Thank you for your time and assistance.
The text was updated successfully, but these errors were encountered: