https://pulumi.com logo
f

full-dress-10026

03/14/2019, 4:05 PM
Does anyone have any idea why I'd be getting this exception after running
pulumi up
?
Copy code
Error: Failed to load gRPC binary module because it was not installed for the current system
    Expected directory: node-v48-linux-x64-glibc
    Found: [node-v57-linux-x64-glibc]
    This problem can often be fixed by running "npm rebuild" on the current system
    Original error: Cannot find module '/home/kenny/compute_software/infrastructure/pulumi-datomic-src/node_modules/grpc/src/node/extension_binary/node-v48-linux-x64-glibc/grpc_node.node'
        at Object.<anonymous> (/home/kenny/compute_software/infrastructure/pulumi-datomic-src/node_modules/grpc/src/grpc_extension.js:53:17)
        at Module._compile (module.js:541:32)
        at Object.Module._extensions..js (module.js:550:10)
        at Module.load (module.js:458:32)
        at tryModuleLoad (module.js:417:12)
        at Function.Module._load (module.js:409:3)
        at Module.require (module.js:468:17)
        at require (internal/module.js:20:19)
        at Object.<anonymous> (/home/kenny/compute_software/infrastructure/pulumi-datomic-src/node_modules/grpc/src/client_interceptors.js:144:12)
        at Module._compile (module.js:541:32)
Running
pulumi up
again results in the same error. As the exception says, I can run
npm rebuild
. After that,
pulumi up
will work as expected. However, if I open a new terminal and run
pulumi up
I get that exception again. This started happening recently and I'm not sure why. I'm on Node 8 installed with nvm, Pulumi 0.17.1. Any ideas on what could cause this?
๐Ÿคจ 1
I also tried
rm -rf node_modules
and
npm install
. Doesn't work either. Curious if there may be a grpc version cached somewhere by Pulumi.
Pulumi actually starts loading and then throws the exception:
Copy code
Previewing update (ComputeSoftware/datomic-dev):

     Type                 Name                 Plan     Info
     pulumi:pulumi:Stack  datomic-datomic-dev           1 error; 15 messages
Interesting... If I add a .nvmrc with v8.0.0 to my directory then run
pulumi up
, it works. Does pulumi not work with nvm?
I usually use fish shell for my day to day. Tried running bash and it works as expected. Must be an issue with nvm + fish...
Reinstalled fish and it works. So long, and thanks for all the fish ๐Ÿ™‚
b

broad-football-5123

03/14/2019, 5:03 PM
It could be that nvm was switching node versions around on you. Probably a good practice to include a .nvmrc to lock it. I use nodenv and I know I get this message when I start moving around my Node versions.