You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
quick note: I've been able to workaround this issue in my TS-based project (https://github.com/npmgraph/npmgraph) by creating a small JS module that just exports the necessary env-var, and importing that into my TS code:
I should also note that this code was working fine until I updated a slew of the project's dependencies. 'Not sure what changed that caused this to break.
I had the same issue after upgrading from 2.9.2 to 2.12.0 and removing my declare let process also worked for me. I now have a TypeScript complaint about an unknown variable though.
🐛 bug report
parcel@latest
process.env
for it to work properly. :-)🎛 Configuration (.babelrc, package.json, cli command)
See attached MRE and envinfo, below
🤔 Expected Behavior
In the attached MRE, you should see the value of
process.env.BUGSNAG_KEY
("00000000000000000000000000000000 " as defined in.env
file) in the browser.😯 Current Behavior
The browser is blank because the script throws (as seen in the console) this:
💻 Code Sample
To reproduce this issue:
cd parcel_process_bug
npm install && npm start
parcel
happens to be running on)Notice: The page is blank page. In the dev tools console you'll see the error described above.
Furthermore... In
index.html
, if you change "index.ts" to "index.js" (i.e. circumvent the need for TS compilation), it works as expected.🌍 Your Environment
The text was updated successfully, but these errors were encountered: