question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stuck at loading + Cannot read property 'env' of undefined

See original GitHub issue

Hi,

I’ve been scratching my head for a while now and simply cannot figure out what is going wrong. I am using the component inside a webview in VS Code and for testing purposes permitted it to fetch the source from CDN. All is fine and dandy till that. But then I get stuck at watching the loading screen. In the dev tools console, there is a single error, stating that Cannot read property 'env' of undefined. When looking into it more carefully with the webview dev tools, it shows me the following: image

which refers to:

image

I am using esbuild for both buildint the react application and the extension using config: `async function build() { let entryPoints = await glob(“./ext-src/*.ts”); return esbuild.build({ entryPoints: [‘src/index.jsx’], outfile: ‘build/static/js/index.js’, loader: {‘.js’: ‘jsx’, “.svg”: “dataurl”, “.png”: “dataurl”, “.ttf”: “dataurl”}, bundle: true, sourcemap: true, watch: true, format: “cjs”, platform: “browser”, target: “es2019”,

}).then(() => {
    return esbuild.build({
        entryPoints: entryPoints,
        outdir: 'build/ext-src',
        watch: true,
        platform: "node",
        target: "es2019",
        format: "cjs",
        sourcemap: true,
        bundle: true,
        external: ["vscode"]
    })
})

}; `

The same happens when trying to use the source from locally installed npm package.

What am I doing wrong?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
XC-commented, May 13, 2021

As an update. I’ve been quite busy for the past two weeks and haven’t had yet time for this. Hopefully soon I’ll get the reproduction done.

1reaction
XC-commented, Apr 29, 2021

Huh, well then this is even more curious and I admit I’m fascinated by the issue in that case. I’ll see if I can reproduce is with as minimal project as possible.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'env' of undefined · Issue #1277 - GitHub
this a bug report Parcel produced an error but builds the packages just fine. Configuration (.babelrc, package.json, cli command) ...
Read more >
Firebase functions environment variables can not read ...
javascript - Firebase functions environment variables can not read property of undefined - Stack Overflow. Collectives™ on Stack Overflow – ...
Read more >
Cannot read properties of undefined (reading ... - Reddit
I am using supabase in a vue app, but stuck with an error Cannot read properties of undefined (reading 'VUE_APP_SUPABASE_URL'). in the .env...
Read more >
Microsoft Teams Stuck on "Loading Microsoft Teams"
I get the following error(s) in the console repeated over and over. ypeError: Cannot read property 'maxNumberOfMeetingVideo' of undefined. at d.
Read more >
Elementor Panel Not Loading – What to Do | Troubleshooting
Disabling widgets didn't help either. I'm seeing the error in the console: TypeError: Cannot read property 'global' of undefined at n.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found