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

Issue with serve for a Nextjs project #357

Open
abdelhamid-attaby opened this issue Mar 8, 2021 · 1 comment
Open

Issue with serve for a Nextjs project #357

abdelhamid-attaby opened this issue Mar 8, 2021 · 1 comment

Comments

@abdelhamid-attaby
Copy link
Collaborator

When running fab serve fab.zip --port=3001 on a specific project it throws the following error. After a couple of investigations, I found the first part of the error which is about .env.local appears even for a new nextjs application, so, I believe it is an issue with FAB but the new project is running smoothly.

The second part (TypeError: http.Agent is not a constructor), which is more important, I cannot know what is the issue with it. I opened server.js but found that http is imported from __webpack_require__(43) and I couldn't trace more.

        [Server] 💎 fab serve 💎
        [Server] Reading fab.zip…
        [Server] ✔ Done. Booting VM…
Failed to load env from .env.local TypeError: e.info is not a function
    at processEnv (evalmachine.<anonymous>:70518:25)
    at Module.1tyE (evalmachine.<anonymous>:44515:9)
    at __webpack_require__ (evalmachine.<anonymous>:41789:29)
    at evalmachine.<anonymous>:41846:20
    at Object.<anonymous> (evalmachine.<anonymous>:41859:7)
    at Object.<anonymous> (evalmachine.<anonymous>:108526:34)
    at __webpack_require__ (evalmachine.<anonymous>:11646:34)
    at Object.<anonymous> (evalmachine.<anonymous>:41765:27)
    at __webpack_require__ (evalmachine.<anonymous>:11646:34)
    at evalmachine.<anonymous>:11710:22
    TypeError: http.Agent is not a constructor
@mishiyee
Copy link

I am also getting this exact same error log when I run npm run fab:serve on my local. My build is without next export because I have API routes in place. Not sure if that is relevant, but I think it's worth mentioning.

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