Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PnpmRun does not work #13

Open
nils-a opened this issue Jul 26, 2024 · 0 comments
Open

PnpmRun does not work #13

nils-a opened this issue Jul 26, 2024 · 0 comments

Comments

@nils-a
Copy link

nils-a commented Jul 26, 2024

Calling PnpmRun("build") does not work.

The output is the following:

Using addin: Cake.Pnpm v1.0.0.0 (1.0.0)
pnpm arguments: run build --loglevel info

> vite-template-redux@0.0.0 build D:\a\1\s\src\ClientUI
> tsc && vite build "--loglevel" "info"

file:///D:/a/1/s/src/ClientUI/node_modules/.pnpm/vite@5.3.4_sass@1.77.8/node_modules/vite/dist/node/cli.js:444
          throw new CACError(`Unknown option \`${name.length > 1 ? `--${name}` : `-${name}`}\``);
                ^

CACError: Unknown option `--loglevel`
    at Command.checkUnknownOptions (file:///D:/a/1/s/src/ClientUI/node_modules/.pnpm/vite@5.3.4_sass@1.77.8/node_modules/vite/dist/node/cli.js:444:17)
    at CAC.runMatchedCommand (file:///D:/a/1/s/src/ClientUI/node_modules/.pnpm/vite@5.3.4_sass@1.77.8/node_modules/vite/dist/node/cli.js:642:13)
    at CAC.parse (file:///D:/a/1/s/src/ClientUI/node_modules/.pnpm/vite@5.3.4_sass@1.77.8/node_modules/vite/dist/node/cli.js:581:12)
    at file:///D:/a/1/s/src/ClientUI/node_modules/.pnpm/vite@5.3.4_sass@1.77.8/node_modules/vite/dist/node/cli.js:914:5
    at ModuleJob.run (node:internal/modules/esm/module_job:262:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:474:24)

Now, the real error here, is that vite does not know what to do with the --loglevel argument, but underlying is the fact that --loglevel is set last.

The documentation states:

Any options for the run command should be listed before the script's name. Options listed after the script's name are passed to the executed script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant