Closed adamberenzweig closed 7 years ago
taking a look at this.
Banged my head against it for a few hours. Fix for now is to add googleapis as a direct dependency of sub/apollo. Not sure what the right thing long term is.
Here's what I learned.
googleapis doesn't play well with webpack -- it internally does a filesystem read to introspect it's "apis" directory (generated code). This fails when webpacked.
I tried to build without bundling googleapis, but that's complicated:
I tried the following:
So then I just added googleapis as a direct dependency of sub/apollo, and it works.
I don't what's the right thing long-term. The current overall approach may continue to cause problems because we're running webpack in one context (sub/apollo) and then sticking a package.json into the docker environment to install things. but because of npm-workspace, the environments are fairly different.
I'll make a PR to revert the reversion of googleapis and the fix, but not till later tonight.
Closing this for now -- the workaround works (adding googleapis as direct dependency of sub/apollo). I'll file a separate issue about webpack and the docker build.
Probably some dependency (request?) doesn't play well w/ webpack.
rich sez: right we've seen that before in node i put the previous random fix http://webpack.github.io/docs/configuration.html#node but still doesn't work also the webpack build complains that swig and js-beauty aren't found (only in the script -- not locally) but when i add them it still doesn't work