pulumi/pulumi · error

locating Pulumi.yaml: %w

Error message

locating Pulumi.yaml: %w

What it means

During package installation Pulumi re-detects the project file via `workspace.DetectProjectPathFrom(root)`. This error wraps any error from that search for Pulumi.yaml/Pulumi.yml in the given root.

Source

Thrown at pkg/cmd/pulumi/project/newcmd/install.go:91

func InstallRequiredPackages(
	ctx context.Context, pctx *plugin.Context, proj *workspace.Project, root, main string,
	prior packageinstallation.State, parallelism int, useLanguageVersionTools bool,
	reg registry.Registry, stdout, stderr io.Writer,
) error {
	lang, err := pctx.Host.LanguageRuntime(pctx, proj.Runtime.Name())
	if err != nil {
		return fmt.Errorf("failed to load language plugin %s: %w", proj.Runtime.Name(), err)
	}

	programInfo := plugin.NewProgramInfo(pctx.Root, pctx.Pwd, main, proj.Runtime.Options())
	packages, specs, err := lang.GetRequiredPackages(ctx, programInfo)
	if err != nil {
		return err
	}

	projPath, err := workspace.DetectProjectPathFrom(root)
	if err != nil {
		return fmt.Errorf("locating Pulumi.yaml: %w", err)
	}

	ws := packageworkspace.New(pluginstorage.Instance, pkgWorkspace.Instance, pctx, stdout, stderr, nil,
		packageworkspace.Options{
			UseLanguageVersionTools: useLanguageVersionTools,
		})

	_, err = packageinstallation.InstallPluginSet(ctx, packages, specs, proj, filepath.Dir(projPath),
		packageinstallation.Options{
			Concurrency: parallelism,
			PriorState:  prior,
			Options: packageresolution.Options{
				ResolveVersionWithLocalWorkspace:           true,
				ResolveWithRegistry:                        !env.DisableRegistryResolve.Value(),
				AllowNonInvertableLocalWorkspaceResolution: true,
			},
		}, reg, ws)
	if err != nil {

View on GitHub (pinned to 793f7b2e16)

Solutions

  1. Confirm Pulumi.yaml exists in the current directory or an ancestor and is readable (`ls -la Pulumi.yaml`)
  2. Check directory read/execute permissions on the path
  3. If Pulumi.yaml is a symlink, verify the target exists
  4. Re-run the command from the project root

Example fix

// before
$ pulumi install   # run in a directory you can't read
locating Pulumi.yaml: permission denied
// after
$ cd ~/myproject && pulumi install
Defensive patterns

Strategy: validation

Validate before calling

[ -r Pulumi.yaml ] && echo ok || echo "project file missing/unreadable"
# verify it is a regular readable file, not a broken symlink
file Pulumi.yaml

Prevention

When it happens

Trigger: Calling `pulumi install` / package installation where DetectProjectPathFrom returns a non-nil error — typically filesystem permission errors, or the root path not being readable while searching for Pulumi.yaml. (A merely missing project file usually yields a distinct 'no project found' error, not this wrap.)

Common situations: Running the command from a directory the user cannot read; a Pulumi.yaml that is a broken symlink; unusual permissions on the working directory.

Related errors


AI-assisted analysis of pulumi/pulumi@793f7b2e16 (2026-08-31). Data as JSON: /api/errors/0d0fff933d75e28b. Report an issue: GitHub.