Hi! I'm trying to create a Cloudflare provider. So...
# general
p
Hi! I'm trying to create a Cloudflare provider. So far, I've installed the pulumi plugin and I have also installed the package for cloudflare. I'm getting the following error when I try to initialize it:
Copy code
error: fatal: failed to Init GRPC to register RPC handlers: failed to create resource provider: ProviderInfo needs a semver-compatible version string, got info.Version=""

  pulumi:providers:cloudflare (myCloudflare):
    error: could not read plugin [/home/myProfileName/.pulumi/plugins/resource-cloudflare-v5.1.0/pulumi-resource-cloudflare] stdout: EOF
Things I checked: • When I do pulumi
pulumi plugin ls
, I get:
Copy code
NAME        KIND      VERSION  SIZE    INSTALLED     LAST USED
cloudflare  resource  5.1.0    45 MB   10 hours ago  10 hours ago
docker      resource  4.2.0    45 MB   2 days ago    2 days ago
gcp         resource  6.55.1   138 MB  18 hours ago  18 hours ago
kubernetes  resource  3.27.1   89 MB   18 hours ago  18 hours ago
random      resource  4.13.0   72 MB   2 days ago    2 days ago
• My
package.json
also seems to have the matching version for this file:
Copy code
{
  "name": "infastructure",
  "scripts": {
    "format": "npx prettier --config ../.prettierrc.json --write ."
  },
  "devDependencies": {
    "@types/node": "^16",
    "prettier": "2.8.8"
  },
  "dependencies": {
    "@pulumi/cloud": "^0.30.1",
    "@pulumi/cloudflare": "5.1.0",
    "@pulumi/docker": "^4.2.0",
    "@pulumi/gcp": "^6.39.0",
    "@pulumi/kubernetes": "^3.26.0",
    "@pulumi/pulumi": "^3.0.0",
    "@pulumi/random": "^4.13.0",
    "typescript": "^4.0.0"
  }
}
• The file exists at the directory specified above • I also tried reinstalling the plugin, and attempting to override it in the Pulumi.yaml file • This is how I'm trying to create the provider:
Copy code
import * as pulumi from '@pulumi/pulumi';
import * as cloudflare from '@pulumi/cloudflare';

	const cloudflareProvider = new cloudflare.Provider('myCloudflare', {
		email: [redacted, hardcoded string with email],
		apiKey: [redacted, hardcoded string with API key],
	});
If it helps, my pulumi version is
v3.67.0
Node version
v16.16.0
b
What OS are you using? Can you post the results of
Pulumi about
(run from your project folder) here please
p
What OS
Debian-based (Pop-os)
pulumi about
Copy code
CLI          
Version      3.67.0
Go Version   go1.20.4
Go Compiler  gc

Plugins
NAME        VERSION
cloudflare  5.1.0
docker      4.2.0
gcp         6.55.1
kubernetes  3.27.1
nodejs      unknown
random      4.13.0

Host     
OS       debian
Version  bookworm/sid
Arch     x86_64

This project is written in nodejs: executable='/home/gabriel-2/.nvm/versions/node/v16.16.0/bin/node' version='v16.16.0'

Current Stack: [REDACTED]

TYPE                                        URN
[REDACTED]

Backend        
Name           <http://pulumi.com|pulumi.com>
URL            <https://app.pulumi.com/GabrielAllfront>
User           GabrielAllfront
Organizations  GabrielAllfront, allfront

Dependencies:
NAME                 VERSION
@pulumi/cloud        0.30.1
@pulumi/cloudflare   5.1.0
@pulumi/docker       4.2.0
@pulumi/gcp          6.55.1
@pulumi/kubernetes   3.27.1
@pulumi/pulumi       3.67.0
@pulumi/random       4.13.0
typescript           4.9.5
@nx-tools/nx-prisma  4.0.3
@prisma/client       4.14.0
@types/node          16.18.30
prettier             2.8.8

Pulumi locates its logs in /tmp by default
Does this help, or are you looking for something in particular?
b
I’ve seen similar with WSL recently so wanted to check it wasn’t that
How did you install the plug-in? Did you just use
npm install @pulumi/cloudflare
p
I used yarn
My lockfile has 5.1.0 defined, and I can see it in the node_modules
Copy code
"@pulumi/cloudflare@5.1.0":
  version "5.1.0"
  resolved "<https://registry.yarnpkg.com/@pulumi/cloudflare/-/cloudflare-5.1.0.tgz#b69714ccaa315d989b534dfc2b1f5c0819dd1b01>"
  integrity sha512-9qGMJX5kEVWErU65oKpfhXEPxi2zFRfMHi4+OnKsyag+oXIMMbG4fqGKCbmmxNd6PPSBBI0GakMFNCcZnH/XPg==
  dependencies:
    "@pulumi/pulumi" "^3.0.0"