https://pulumi.com logo
Title
w

worried-engineer-33884

01/22/2020, 5:05 PM
i'm getting this error fairly often when working with a pulumi branch:
Failed to load gRPC binary module because it was not installed for the current system
    Expected directory: node-v79-darwin-x64-unknown
    Found: [node-v72-darwin-x64-unknown]
    This problem can often be fixed by running "npm rebuild" on the current system
    Original error: Cannot find module '/opt/pulumi/node_modules/@pulumi/pulumi/node_modules/grpc/src/node/extension_binary/node-v79-darwin-x64-unknown/grpc_node.node' from 'grpc_extension.js'
cd /opt/pulumi/node_modules/@pulumi/pulumi && npm rebuild
seems to fix it, but mildly annoying.
w

white-balloon-205

01/22/2020, 8:51 PM
That suggests you are changing node versions between when you “NPM install” and when you run “Pulumi up”. If you ensure you run the same node version for both, you should never see this. That said, we are hoping to get rid of the native code dependency which leads to this whole class of problems as part of 2.0 in a couple months.
w

worried-engineer-33884

01/22/2020, 9:09 PM
this is when i run unit tests, and i'm not switching node versions (that i know of). i am using nvm to manage node in general which might be at odds with the
make
script in the pulumi nodejs sdk which may rely on brew-installed node. i don't use brew installed node, but it was installed per the pulumi contributor instructions as a dependency of yarn (which we also don't normally use).
w

white-balloon-205

01/22/2020, 9:24 PM
Yeah - somehow you are ending up using two different
node
versions here.
i don't use brew installed node, but it was installed per the pulumi contributor instructions as a dependency of yarn
I see - that is likely part of the root cause here. I don't off the top of my head know how best to address this - but it would be unique to trying to build locally and use a different node version than the local build for your development.
w

worried-engineer-33884

01/22/2020, 9:37 PM
It's not a big deal to continue with
npm rebuild
if this is going to be holistically addressed as part of 2.0. Thanks for the info.