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
"Failed to load env from …\.env TypeError: Cannot read properties of undefined (reading 'split')" and "Module not found: Can't resolve '@builder.io/partytown/integration' in …" errors #35645
Comments
Are you using the recently introduced Script with an experimental worker strategy? Would you mind attaching a reproduction/your code? 🙏 |
Ran into the same issue. Easily reproduced with an |
@omareg94 I can't seem to reproduce this issue locally, so like Balázs mentioned - please share a reproduction :) @FernandVEYRIER Are you seeing |
…#35793) A few errors about Next.js not correctly handling the missing partytown dependency in `_document.js` have been flagged. Instead of `/* webpackIgnore: true */`, this PR switches to use [`__non_webpack_require__`](https://webpack.js.org/api/module-variables/#__non_webpack_require__-webpack-specific) to ensure webpack doesn't process fetching the dep server-side. ----- Related issues: - #35645 - #35630 (comment)
Hello @housseindjirdeh ! Thanks for the quick reply.
Here is the whole dump of the only error on start |
I'm also facing the same problem after updating my REACT version to 18 |
My steps to recreate:
error - Failed to load env from /Users/******/Dev/testsite/.env.local TypeError: Cannot read properties of undefined (reading 'split') **EDIT: READING THE DOCS - The $ symbol now needs to be escaped i.e. |
For
|
Thanks for the details everyone. Looks like there are two separate issues here:
|
Closing this for now! @omareg94 if you are still running into the issue, please update your next dep to v12.1.5-canary.0 as that should fix the problem. |
…egration' in …" yarn devで上記のエラーが出る。 このissueが同様の問題だった。 vercel/next.js#35645 プロジェクト側の問題かもしれないが、next側でthrowする必要はなさそうなため治したとのこと。 canaryバージョンではあるが、上げることによって修正を取り込み解決した。
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Enterprise
Binaries:
Node: 16.14.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 12.1.2-canary.0
react: 17.0.2
react-dom: 17.0.2
How are you deploying your application? (if relevant)
npx cross-env DEBUG=server:* node server.js
Describe the Bug
When I run
npx cross-env DEBUG=server:* node server.js
using next latest stable release12.1.1
or latest canary release12.1.2-canary.0
, I get:However, on next previous stable release
12.1.0
, it works normally without any of these warnings.Expected Behavior
App to work normally without either of these warnings:
error - Failed to load env from C:\my-app.env TypeError: Cannot read properties of undefined (reading 'split')
warn - ./node_modules/next/dist/pages/_document.js
Module not found: Can't resolve '@builder.io/partytown/integration' in 'C:\my-app\node_modules\next\dist\pages'
To Reproduce
Use .env file, and custom _document.js on stable release
12.1.1
or canary release12.1.2-canary.0
.The text was updated successfully, but these errors were encountered: