Feel like this has come up before but why might I ...
# general
m
Feel like this has come up before but why might I be seeing
error: It looks like the Pulumi SDK has not been installed. Have you run npm install or yarn install?
after updating the pulumi version and updating my checkout on another machine - upgrade was fine on ci and the machine i did the bump on but now ive switched and getting this. additional context: using nix to manage pulumi-bin install
e
Have you ran "npm install"? Is
@pulumi
in the node_modules folder?
m
yup yup
e
Can you run
node -e console.log(require.resolve('@pulumi/pulumi/cmd/run'))
in the project directory?
m
/home/chris/projects/monorepo/node_modules/@pulumi/pulumi/cmd/run/index.js
e
😐 odd that error message should only trigger in the event that command fails
m
command im running is
pulumi preview --stack preview --cwd platform/app-platform
e
Does your environment define PULUMI_LANGUAGE_NODEJS_RUN_PATH?
m
nope
e
hmm wonder if --cwd is messing it up but I wouldn't expect that to be machine specific
can you run it from the app-platform folder directly?
m
yeah, ive also just cd'ed into the directory and run from there and same issue
e
does app_platform have node_modules in it?
m
No, but require.resolve will look up directories
Validated that by running your command in that dir
e
Does you Pulumi.yaml have a "main" option set?
m
could anything odd happen if certain dependencies are installed in differnt orders? I'm thinking because we have a) nix that installs pulumi-bin, npm installs the sdk, then some custom script that installs a non-registry plugin
docker-buildkit
Could things get in an odd state if say we installed a specific sdk version before pulumi-bin was updated?
Does you Pulumi.yaml have a "main" option set?
Yes, and nodejs runtime without typescript because of the old typescript version issues
e
ah, well that's the next culprit to investigate. "main" could be changing current working directory such that require.resolve isn't resolving anymore.
m
get the same require.resolve result from dist/pulumi which is where the main script is
have to hop onto a call now so wont be able to respond, but thank you for the support
e
OK I'm end of day now unfortunately. I'll nudge internally see if anyone else can hop in from US timezone.
513 Views