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

Confusing output when the root isn't an npm project, leaves a mess. #286

Open
srl295 opened this issue Aug 28, 2024 · 0 comments
Open

Confusing output when the root isn't an npm project, leaves a mess. #286

srl295 opened this issue Aug 28, 2024 · 0 comments

Comments

@srl295
Copy link

srl295 commented Aug 28, 2024

Hi. I'm using this action to upload a project that's not at root an npm project. The output is kind of confusing, and leaves a mess of the workspace.

  /usr/local/bin/npx --no-install wrangler --version
  npm error npx canceled due to missing packages and no YES option: ["[email protected]"]
  npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2024-08-28T17_12_25_179Z-debug-0.log
  ⚠️ Wrangler not found or version is incompatible. Installing...
📥 Installing Wrangler
  /usr/local/bin/npm i [email protected]

okay. Why did you do npm i instead of just npx [email protected] ? Doesn't make sense.

Then when it goes to run:

  /usr/local/bin/npx wrangler pages deploy ./_site --project-name=cldr
  ▲ [WARNING] Warning: Your working directory is a git repo and has uncommitted changes
    To silence this warning, pass in --commit-dirty=true

Well, yeah, you dirtied it, wrangler :)

Run git status
HEAD detached at pull/3989/merge
Untracked files:
  (use "git add <file>..." to include in what will be committed)
	node_modules/
	package-lock.json
	package.json

So wrangler-action has added a node_modules, package.json and package-lock.json in my work area. And then complains that my work area is a mess.

I'm going to try a preemptive npm i -g [email protected] to see if it cleans things up.

srl295 added a commit to unicode-org/cldr that referenced this issue Aug 28, 2024
- pre-emptively install wrangler
- see cloudflare/wrangler-action#286 - otherwise wrangler leaves the repo a mess.
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