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

Cannot find module '../lib/load-env-config'. #11396

Closed
comxd opened this issue Mar 27, 2020 · 7 comments · Fixed by #11397, yowainwright/Advanced-React#46 or zagrajmy/frontend#162 · May be fixed by GreyWolfLab/devPortal#3 or zagrajmy/frontend#163
Closed
Labels
please add a complete reproduction The issue lacks information for further investigation
Milestone

Comments

@comxd
Copy link
Contributor

comxd commented Mar 27, 2020

I use a similar structure of this example, during compilation of functions:

tsc --project src/functions

I got this error:

node_modules/next/types/index.d.ts:8:21 - error TS2307: Cannot find module '../lib/load-env-config'.

System information

  • OS: (K)Ubuntu 19.10
  • Version of Node: 10.19.0
  • Version of Next.js: 9.3.2
@timneutkens
Copy link
Member

Please provide a full reproduction as asked for in the issue template

@timneutkens timneutkens added the please add a complete reproduction The issue lacks information for further investigation label Mar 27, 2020
@pcfields
Copy link

I got the same error after using the the with-firebase-hosting-and-typescript example project and running npm run deploy

@comxd
Copy link
Contributor Author

comxd commented Mar 27, 2020

Fixing the path in node_modules/next/types/index.d.ts working good:
import { Env } from '../dist/lib/load-env-config';

I can provide more details later.

@Timer Timer added this to the 9.3.3 milestone Mar 27, 2020
@combstraight
Copy link

Getting the same error.

Fixing the path in node_modules/next/types/index.d.ts working good:
import { Env } from '../dist/lib/load-env-config';

I can provide more details later.

This fixed it as well.

@arusakov
Copy link

arusakov commented Mar 27, 2020

Use patch-package for repeatable fix after each yarn install or npm ci.

@comxd comxd mentioned this issue Mar 30, 2020
timneutkens added a commit that referenced this issue Mar 30, 2020
Co-authored-by: Tim Neutkens <[email protected]>
@Timer
Copy link
Member

Timer commented Mar 30, 2020

Fixed in 9.3.3

@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.