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

Pre comile error caused by pnpm version #2

Closed
Domonlee opened this issue Mar 30, 2023 · 2 comments
Closed

Pre comile error caused by pnpm version #2

Domonlee opened this issue Mar 30, 2023 · 2 comments

Comments

@Domonlee
Copy link

因为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/miniprogram-action@1.0.0' (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/miniprogram-action@1.0.0
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
@crazyurus
Copy link
Owner

感谢反馈,我先固定下pnpm的版本

@crazyurus
Copy link
Owner

发现是 pnpm@8 的 lock 文件格式更新了导致的,已将项目 lock 文件更新并固定了 pnpm 版本为 8。问题已解决

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

2 participants