# general


06/08/2021, 4:53 PM
Hi, I have a inline program that creates a Table and an API resource from pulumi-cloud, and when I run it the first time (creating the resources) I get this error:
failed to register new resource my-api-resource-name [awsapigateway/stageStage]: Resource monitor is terminating
at Object.registerResource (/node_modules/@pulumi/pulumi/runtime/resource.js21927)
at new Resource (/node_modules/@pulumi/pulumi/resource.js21524)
at new CustomResource (/node_modules/@pulumi/pulumi/resource.js3079)
at new Stage (/node_modules/@pulumi/apigateway/stage.ts2009)
at new API (/node_modules/@pulumi/apigateway/api.ts57122)
at new HttpDeployment (/node_modules/@pulumi/api.ts20020)
at API.publish (/node_modules/@pulumi/api.ts13127)
at Resource.output (own code, line points to this code
return { url: api.publish().url };
When I run it again, it successfully creates that missing resource. I tried to debug it but I can't find out what the issue could be. Any hints on where to look or how to debug would be very appreciated.
I added some more information to the message.
After further debugging it looks like the issue comes from the fact that there are more than one copy of the Pulumi package that are being used. My app is divided into 2 modules: a CLI and a stand alone library. The CLI depends and uses the library and both have "@pulumi/pulumi" as a dependency, so every package is using its own version of the Pulumi package in its own 'node_modules' folder. Making the pulumi packages to peer dependencies in the library fixed the issue.
Is this an expected behaviour?