Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

error npx: command not found #74

Open
RodrigoDornelles opened this issue Mar 25, 2023 · 4 comments
Open

error npx: command not found #74

RodrigoDornelles opened this issue Mar 25, 2023 · 4 comments

Comments

@RodrigoDornelles
Copy link

not working inside of container action :/

with:
    apiToken: ***
    accountId: ***
    projectName: doxygen-[3](https://github.com/RodrigoDornelles/3bc-lang/actions/runs/4518829344/jobs/7958944351#step:5:3)bc
    directory: html
    gitHubToken: ***
/usr/bin/docker exec  90eb791a8e9e29532bfdb63bc7[4](https://github.com/RodrigoDornelles/3bc-lang/actions/runs/4518829344/jobs/7958944351#step:5:4)[5](https://github.com/RodrigoDornelles/3bc-lang/actions/runs/4518829344/jobs/7958944351#step:5:5)ea51bb05c3f87cb3189488e7[6](https://github.com/RodrigoDornelles/3bc-lang/actions/runs/4518829344/jobs/7958944351#step:5:6)[7](https://github.com/RodrigoDornelles/3bc-lang/actions/runs/4518829344/jobs/7958944351#step:5:7)7725[9](https://github.com/RodrigoDornelles/3bc-lang/actions/runs/4518829344/jobs/7958944351#step:5:10)026ff sh -c "cat /etc/*release | grep ^ID"
bash: line 6: npx: command not found
EXIT WHEN NOT EXPECTED

SHELLAC COMMAND FAILED!
Executing: npx wrangler@2 pages publish "html" --project-name="doxygen-3bc" --branch="" in /__w/3bc-lang/3bc-lang

STDOUT:



STDERR:

bash: line 6: npx: command not found


node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".] {
  code: 'ERR_UNHANDLED_REJECTION'
}
@RealRTTV
Copy link

Encountering the same issue, any updates?

@RealRTTV
Copy link

workflow file:

name: Compile and Publish Web Assembly Edition

on:
  push:
    branches: [ "master" ]
  pull_request:
    branches: [ "master" ]

env:
  CARGO_TERM_COLOR: always

jobs:
  wasm:
    runs-on: windows-latest

    steps:
      - name: disable git eol translation
        run: git config --global core.autocrlf false
      - name: checkout
        uses: actions/checkout@v3

      - name: Install Wrangler
        run: |
          node -v
          npx --yes [email protected]

      - name: Install Rustup using win.rustup.rs
        run: |
          # Disable the download progress bar which can cause perf issues
          $ProgressPreference = "SilentlyContinue"
          Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
          .\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --default-toolchain=nightly
          del rustup-init.exe
          rustup target add x86_64-pc-windows-msvc --toolchain nightly
          rustup target add wasm32-unknown-unknown --toolchain nightly
        shell: powershell

      - name: Add mingw64 to path for x86_64-msvc
        shell: bash
        run: echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH

      - name: Add wasm-pack
        shell: cmd
        run: cargo install wasm-pack

      - name: Build
        shell: cmd
        run: wasm-pack build --release --target web --out-dir nbtworkbench

      - name: Publish
        uses: cloudflare/pages-action@v1
        with:
          apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
          accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
          gitHubToken: ${{ secrets.GITHUB_TOKEN }}
          projectName: 'nbtworkbench'
          directory: .
          workingDirectory: './web'
          wranglerVersion: 3.28.2

@matteosister
Copy link

same problem here! Any updates?

@lovette
Copy link

lovette commented Jul 19, 2024

My job ran just fine until I set wranglerVersion to 3 then the job started failing.

Run cloudflare/pages-action@v1
npm warn exec The following package was not found and will be installed: [email protected]
npm warn deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
npm warn deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
▲ [WARNING] `wrangler pages publish` is deprecated and will be removed in the next major version.
Please use `wrangler pages deploy` instead, which accepts exactly the same arguments.
▲ [WARNING] Warning: Your working directory is a git repo and has uncommitted changes
To silence this warning, pass in --commit-dirty=true
✘ [ERROR] EACCES: permission denied, mkdir '/home/runner/work/myproject2x/myproject2x/docs/site/.wrangler/tmp'
If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose
? Would you like to report this error to Cloudflare?
🤖 Using fallback value in non-interactive context: no
🪵  Logs were written to "/home/runner/.config/.wrangler/logs/wrangler-2024-07-19_14-25-45_272.log"
npm notice
npm notice New minor version of npm available! 10.7.0 -> 10.8.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.2
npm notice To update run: npm install -g [email protected]
npm notice
EXIT WHEN NOT EXPECTED
SHELLAC COMMAND FAILED!
Executing: npx wrangler@3 pages publish "." --project-name="myproject-internal-docs" --branch="" in /home/runner/work/myproject2x/myproject2x/docs/site
node:internal/process/promises:289
			triggerUncaughtException(err, true /* fromPromise */);
			^
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".] {
code: 'ERR_UNHANDLED_REJECTION'
}
Node.js v20.13.1
STDOUT:
If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose
? Would you like to report this error to Cloudflare?
🤖 Using fallback value in non-interactive context: no
STDERR:
npm warn exec The following package was not found and will be installed: [email protected]
npm warn deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
npm warn deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
▲ [WARNING] `wrangler pages publish` is deprecated and will be removed in the next major version.
Please use `wrangler pages deploy` instead, which accepts exactly the same arguments.
▲ [WARNING] Warning: Your working directory is a git repo and has uncommitted changes
To silence this warning, pass in --commit-dirty=true
✘ [ERROR] EACCES: permission denied, mkdir '/home/runner/work/myproject2x/myproject2x/docs/site/.wrangler/tmp'
🪵  Logs were written to "/home/runner/.config/.wrangler/logs/wrangler-2024-07-19_14-25-45_272.log"
npm notice
npm notice New minor version of npm available! 10.7.0 -> 10.8.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.2
npm notice To update run: npm install -g [email protected]
npm notice

My step options are straightforward.

- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
  wranglerVersion: '3'
  accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID}}
  apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN}}
  projectName: myproject-internal-docs
  workingDirectory: ./docs/site
  directory: .

FWIW, I'm new to GitHub Actions and Cloudflare Pages.

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

No branches or pull requests

4 participants