Skip to content

[Bug] Use pnpm when building TS worker from source #712

@THardy98

Description

@THardy98

The Typescript SDK has transitioned from npm to pnpm for build scripts (see: temporalio/sdk-typescript#1793)

When building the TS worker from source (i.e. when version is a path), we use npm:

		// Have to build the local repo
		if st, err := os.Stat(filepath.Join(options.Version, "node_modules")); err != nil || !st.IsDir() {
			// Only install dependencies, avoid triggerring any post install build scripts
			cmd := exec.CommandContext(ctx, "npm", "ci", "--ignore-scripts")
			...

			// Build the SDK, ignore the unused `create` package as a mostly insignificant micro optimisation.
			cmd = exec.CommandContext(ctx, "npm", "run", "build", "--", "--ignore", "@temporalio/create")
			...
		}

npm ci fails because it expects package-lock.json but now that we use pnpm, we have pnpm-lock.yaml

We should fix this to use pnpm instead of npm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions