Giter VIP home page Giter VIP logo

miniprogram-action's Introduction

Hi, I'm Crazy Urus

  • 🔭 Front-end/Full-stack developer
  • 🍋 Interested in React, Mini Program, Node.js, AI LLMs, DevTools and Web Security
  • 📍 Base Wuhan
  • 💼 Working at an Internet company
  • 👨‍🎓 Graduated from Wuhan University of Technology
  • 🌍 Website https://crazyurus.com

stats

miniprogram-action's People

Contributors

crazyurus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

miniprogram-action's Issues

Pre comile error caused by pnpm version

因为pnpm 8.x版本导致的ci流程中断,可以参考ERR_PNPM_FROZEN_LOCKFILE_WITH_OUTDATED_LOCKFILE  Cannot perform a frozen installation because the lockfile needs updates,解决方案是指定pnpm 7的版本,或者按照log中提示进行修改命令。

以下是小程序项目中action的报错log

2023-03-30T02:22:14.8817294Z Getting action download info
2023-03-30T02:22:15.2117629Z Download action repository 'actions/checkout@v3' (SHA:8f4b7f84864484a7bf31766abe9204da3cbe65b3)
2023-03-30T02:22:15.5553410Z Download action repository 'pnpm/action-setup@v2' (SHA:c3b53f6a16e57305370b4ae5a540c2077a1d50dd)
2023-03-30T02:22:15.9140890Z Download action repository 'crazyurus/[email protected]' (SHA:ffdde90aca632d483b7a8385f6952a53ca7a6e11)
2023-03-30T02:22:16.1928717Z Download action repository 'dannyskoog/pull-request-comment@v1' (SHA:54cf08aa0f39bb1e14b830911f1a3d40660bc44d)
2023-03-30T02:22:16.6537724Z Complete job name: preview
2023-03-30T02:22:16.7671433Z ##[group]Run crazyurus/[email protected]
2023-03-30T02:22:16.7672049Z with:
2023-03-30T02:22:16.7672472Z   action_type: preview
2023-03-30T02:22:16.7672935Z   project_path: .
2023-03-30T02:22:16.7673367Z   scene: 1011
2023-03-30T02:22:16.7673793Z   version: 1.0.0
2023-03-30T02:22:16.7674214Z env:
2023-03-30T02:22:16.7680495Z   PRIVATE_KEY: ***
2023-03-30T02:22:16.7680959Z ##[endgroup]
2023-03-30T02:22:22.7654300Z 
2023-03-30T02:22:22.7656199Z added 1 package in 877ms
2023-03-30T02:22:22.7656553Z 
2023-03-30T02:22:22.7656787Z 1 package is looking for funding
2023-03-30T02:22:22.7721703Z   run `npm fund` for details
2023-03-30T02:22:23.5063204Z  ERR_PNPM_FROZEN_LOCKFILE_WITH_OUTDATED_LOCKFILE  Cannot perform a frozen installation because the version of the lockfile is incompatible with this version of pnpm
2023-03-30T02:22:23.5064009Z 
2023-03-30T02:22:23.5064202Z Try either:
2023-03-30T02:22:23.5064927Z 1. Aligning the version of pnpm that generated the lockfile with the version that installs from it, or
2023-03-30T02:22:23.5065740Z 2. Migrating the lockfile so that it is compatible with the newer version of pnpm, or
2023-03-30T02:22:23.5066576Z 3. Using "pnpm install --no-frozen-lockfile".
2023-03-30T02:22:23.5067196Z Note that in CI environments, this setting is enabled by default.
2023-03-30T02:22:23.5551461Z node:child_process:902
2023-03-30T02:22:23.5552337Z     throw err;
2023-03-30T02:22:23.5553269Z     ^
2023-03-30T02:22:23.5553911Z 
2023-03-30T02:22:23.5555123Z Error: Command failed: pnpm install --frozen-lockfile
2023-03-30T02:22:23.5555806Z     at checkExecSyncError (node:child_process:828:11)
2023-03-30T02:22:23.5556412Z     at execSync (node:child_process:899:15)
2023-03-30T02:22:23.5558269Z     at exec (/home/runner/work/_actions/crazyurus/miniprogram-action/1.0.0/scripts/install.js:4:3)
2023-03-30T02:22:23.5559368Z     at Object.<anonymous> (/home/runner/work/_actions/crazyurus/miniprogram-action/1.0.0/scripts/install.js:11:1)
2023-03-30T02:22:23.5560164Z     at Module._compile (node:internal/modules/cjs/loader:1105:14)
2023-03-30T02:22:23.5560867Z     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
2023-03-30T02:22:23.5561534Z     at Module.load (node:internal/modules/cjs/loader:981:32)
2023-03-30T02:22:23.5562208Z     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
2023-03-30T02:22:23.5562975Z     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
2023-03-30T02:22:23.5563587Z   status: 1,
2023-03-30T02:22:23.5564005Z   signal: null,
2023-03-30T02:22:23.5564453Z   output: [ null, null, null ],
2023-03-30T02:22:23.5564883Z   pid: 1612,
2023-03-30T02:22:23.5565305Z   stdout: null,
2023-03-30T02:22:23.5565733Z   stderr: null
2023-03-30T02:22:23.5566192Z }
2023-03-30T02:22:23.5944834Z Cleaning up orphan processes

预览图片报错

报错如下图所示
image
action配置是:

name: 小程序预览
on:
  push:
    branches:
      - develop
jobs:
  preview:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [16.x, 18.x]
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node-version }}
          cache: 'yarn'
      
      - name: Run install
        run: yarn install --frozen-lockfile
      
      - name: Build production bundle
        run: yarn build
      
      - id: preview
        name: Compile
        uses: crazyurus/[email protected]
        with:
          action_type: preview
          project_path: './dist/build/mp-weixin'
        env:
          PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
      - name: QR Code
        uses: peter-evans/commit-comment@v2
        with:
          body: |
            Copy the following content to the address bar of the browser to open the preview QR code
            ```
            ${{ steps.preview.outputs.preview_qrcode }}
            ```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.