-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Fs module error while using package. #26
Comments
Hi @devanshSingh5656. Thank you for your report. Could you tell me the usage? Which one are you using? https://github.com/jellydn/next-swagger-doc#usage-1-create-an-single-api-document or https://github.com/jellydn/next-swagger-doc#usage-2-use-nextjs-api-route-for-create-swagger-json-spec It would be helpful for me investigating if you share the package.json and next.config.js. Thanks. |
At first glance, I guess the |
Please check the example app https://github.com/jellydn/next-swagger-doc/blob/main/example/README.md if you want to see how it works. Thanks. |
re.
So it's working on local but it's showing empty on production deployment, right? Interesting 🤔 . How do you set up the deployment? It could give me some insights to think about this. Thanks. |
Hi @devanshSingh5656 Please check out the latest version https://github.com/jellydn/next-swagger-doc/releases/tag/v0.1.7 Let me know if that works for you. Thanks. |
used vercel deployment |
It shouldn't be an issue anymore. My example app is also deployed to vercel. |
can you make the package available on npm? |
It's published on npm already. |
Module not found: Can't resolve 'fs'.
i try to resolve it so i use this in NEXT config file the error resolve and it work perfectly in local
BUT WHEN DEPLOY TO SERVER IT WON'T WORK.
![Capture](https://user-images.githubusercontent.com/81424670/123503169-e021f300-d66e-11eb-924f-f3b601f42baf.PNG)
webpack: (config, { isServer }) => {
// Fixes npm packages that depend on
fs
moduleif (!isServer) {
config.node = {
fs: "empty",
};
}
PLEASE PROVIDE HELP ASAP.
The text was updated successfully, but these errors were encountered: