https://pulumi.com logo
#general
Title
# general
i

icy-engineer-10830

09/06/2019, 4:40 PM
this error is pretty vague, anyone have an idea of what's going on here or how I can debug?
Copy code
Created stack 'dev'
Previewing update (dev):
     Type                 Name              Plan     Info
     pulumi:pulumi:Stack  azurenetwork-dev           1 message
 
Diagnostics:
  pulumi:pulumi:Stack (azurenetwork-dev):
    error: It looks like the Pulumi SDK has not been installed. Have you run npm install or yarn install?
 
error: failed to load language plugin nodejs: could not read plugin [/Users/jonbrwn/.pulumi/bin/pulumi-language-nodejs] stdout: EOF
c

clever-sunset-76585

09/06/2019, 4:42 PM
Just like the error says `error: It looks like the Pulumi SDK has not been installed. Have you run npm install or yarn install?`…have you run either
npm install
or
yarn install
?
When you run
pulumi new
to setup a new project/stack, it runs it automatically for you unless you canceled out of it before it can.
..in which case, you should restore the
npm
dependencies on your own.
i

icy-engineer-10830

09/06/2019, 4:45 PM
yes, I previously attempted to run
npm install
in the same directory and the error still appears.
the error is propagated from running the
pulumi-language-nodejs
binary
b

broad-dog-22463

09/06/2019, 4:51 PM
what does your package.json look like @icy-engineer-10830?
i

icy-engineer-10830

09/06/2019, 4:54 PM
this fixed it:
npm install --save @pulumi/pulumi
not sure if the problem had to do with a recent npm update or a pulumi update
c

clever-sunset-76585

09/06/2019, 6:46 PM
Hmm that package would have been installed, by default, when you bootstrapped the new project. How did you create your project/stack? Did you use
pulumi new
at all?
i

icy-engineer-10830

09/06/2019, 10:08 PM
@clever-sunset-76585 no, is that recommended for automated projects?
c

clever-sunset-76585

09/06/2019, 10:11 PM
No it is not a recommendation per se. It’s a convenient way to create a new project with the default packages that are needed. You can always create a new project, and stack running the individual commands as you need, but you should make sure that you always add the core
npm
packages as
dependencies
(speaking for the NodeJS runtime, of course.) The core dependencies being the
@pulumi/pulumi
and the respective provider package, i.e.
@pulumi/aws
,
@pulumi/kubernetes
,
@pulumi/azure
etc.
Also what do you mean by “automated projects”?
i

icy-engineer-10830

09/06/2019, 10:17 PM
@clever-sunset-76585 projects that are predefined and shared. so should a package.json be included in the directory to ensure those get installed? i.e. making sure users run
npm install
and then
pulumi up
c

clever-sunset-76585

09/06/2019, 10:19 PM
so should a package.json be included in the directory to ensure those get installed? i.e. making sure users run `npm install`and then
pulumi up
Yes. It should be in the same directory as your pulumi app code, i.e. where the
index.ts
file is located.
i

icy-engineer-10830

09/06/2019, 10:45 PM
got it, thanks
c

clever-sunset-76585

09/06/2019, 10:49 PM
Also, not sure if you have seen our tutorials (which sources examples from the examples repo), but have a look at: https://www.pulumi.com/docs/tutorials/ or if you prefer browsing the GitHub repo directly: https://github.com/pulumi/examples