External contributor instructions don't work for web on Windows
Hi, I've followed the instructions in your README here and have set everything up fresh. When I run npm run proxy I see this in CLI:
> [email protected] proxy ...\Expensify.cash
> node proxy.js & webpack-dev-server --open --config config/webpack/webpack.dev.js --env.proxy=true
Proxy server listening at http://localhost:9000
Navigating to http://localhost:9000 redirects me to expensify.com. I've followed all the steps (though if I'm supposed to set up ngrok, the linked stackoverflow is private)
Please let me know how to set up the project as an external contributor. Thank you :)
(PS: on Windows 10, Firefox and Edge Chromium)
If I try to run npm run web instead, I get this error:

Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
at Module.<anonymous> (global.js:20)
at Module../node_modules/webpack/buildin/global.js (app-9843bb43b85a977c7960.bundle.js:189676)
Thanks, just saw the updated README today. I've copied the latest production env file and switch use_web_proxy to true.
The page I get redirected to now is https://www.expensify.com/?exitTo=inbox&email=
(also happy holidays & new year to anyone reading this :) )
@dylmye thanks for creating this proactively! are you sorted or is this still an issue for you?
This is an issue for me as well.
Hi @laurenreidexpensify, I'm still having this issue on the latest version of master ([email protected]).
It works fine on MacOS - localhost:8080 is launched when running npm run proxy and it is functional. However this behaviour does not occur on Windows.
Related issue: #1125
#1144 Solves this issue on my end.
Hey @dylmye
Can you confirm -
- That the error is still occurring
- whether you have a proposed solution for fixing it?
Thanks!
Going to close this since there hasn't been much activity.
I'm getting the same error. The change to babel.config.js here #1144 fixes this for me too
Though you can add it like:
const webpack = {
sourceType: 'unambiguous',
env: {
production: {
presets: defaultPresets,
plugins: [...defaultPlugins, 'transform-remove-console'],
},
development: {
presets: defaultPresets,
plugins: defaultPlugins,
},
},
};
I'm not sure what exactly causes this but looks like it's related to babel config in the root of the project - everything using babel internally might use it - I think webpack-dev-server uses it to compile stuff (it's socket client) internally
I don't have this problem for other projects where I'm using an earlier version of webpack and webpack-dev-server
Updating webback-dev-server (latest atm 3.11.2) didn't solve this
To start the dev web server on windows edit the package.json like so:
"web-server": "webpack-dev-server --open --config config/webpack/webpack.dev.js",
"web-proxy": "node web/proxy.js",
And start the two processes separately on different terminals
- first
npm run web-proxyin one terminal - then
npm run webin the other
The changes to sourceType: 'unambiguous', are also required under windows
I keep these changes in a separate stash and use them locally being careful not to commit them
The problem is under windows you can't use & to start processes in parallel
There are npm packages that solve this like https://www.npmjs.com/package/concurrently
"web": "concurrently \"npm:web-proxy\" \"npm:web-server\""
"web-server": "webpack-dev-server --open --config config/webpack/webpack.dev.js",
"web-proxy": "node web/proxy.js",
Edit:
Since concurrently is already installed this works for me:
"web": "concurrently npm:web-proxy npm:web-server",
"web-server": "webpack-dev-server --open --config config/webpack/webpack.dev.js",
"web-proxy": "node web/proxy.js",
You might need to wrap "npm:web-proxy" and "npm:web-server" in quotes, it works without them for me

end up with this error.