You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Cannot find module '@lerna/project'
Require stack:
- xxx\noop.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (xxx\node_modules\.pnpm\@cspotcode+source-map-support@0.8.1\node_modules\@cspotcode\source-map-support\source-map-support.js:811:30)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at module.exports (xxx\node_modules\.pnpm\import-from@4.0.0\node_modules\import-from\index.js:5:100)
at xxx\node_modules\.pnpm\@commitlint+config-lerna-scopes@17.4.2_lerna@6.6.1\node_modules\@commitlint\config-lerna-scopes\index.js:45:26
at async execute (xxx\node_modules\.pnpm\@commitlint+execute-rule@17.4.0\node_modules\@commitlint\execute-rule\src\index.ts:20:16)
at async Promise.all (index 11)
at async load (xxx\node_modules\.pnpm\@commitlint+load@17.5.0\node_modules\@commitlint\load\src\load.ts:78:3) {
code: 'MODULE_NOT_FOUND',
requireStack: [ 'E:\\xxx\\noop.js' ]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
husky - commit-msg hook exited with code 1 (error)
I noticed an error in this position:
@commitlint/config-lerna-scopes/index.js this file:
because lerna@6.6.1 doesn't have this package anymore(@lerna/project)
but have this package(@lerna/project) in lerna@6.4.1 version
Affected packages
cli
core
prompt
config-angular
Possible Solution
@commitlint/config-lerna-scopes/index.js
// fix this code, lerna doesn't have this package anymore(@lerna/project)
const {getPackages} = importFrom(cwd, '@lerna/project');
Steps to Reproduce
1. First step
use "@commitlint/cli": "^17.5.0","@commitlint/config-conventional": "^17.4.4","@commitlint/config-lerna-scopes": "^17.4.2","lerna": "6.6.1","lint-staged": "^13.2.0",pnpm@8.1.0
use pnpm install package
2. Second step
commit code with commitlint,then commit error.
Context
Using pnpm to manage lerna, unable to submit code after upgrading lerna.
commitlint --version
@commitlint/config-lerna-scopes@17.4.2
git --version
2.26.0.windows.1
node --version
16.14.0
The text was updated successfully, but these errors were encountered:
Expected Behavior
Expected:Can submit code normally without reporting errors!
Current Behavior
"@commitlint/config-lerna-scopes": "^17.4.2",
"lerna": "6.6.1",
pnpm@8.1.0
when i use lerna@6.6.1, commit code with error:
I noticed an error in this position:
@commitlint/config-lerna-scopes/index.js this file:
because lerna@6.6.1 doesn't have this package anymore(@lerna/project)
but have this package(@lerna/project) in lerna@6.4.1 version
Affected packages
Possible Solution
@commitlint/config-lerna-scopes/index.js
// fix this code, lerna doesn't have this package anymore(@lerna/project)
const {getPackages} = importFrom(cwd, '@lerna/project');
Steps to Reproduce
Context
Using pnpm to manage lerna, unable to submit code after upgrading lerna.
commitlint --version
@commitlint/config-lerna-scopes@17.4.2
git --version
2.26.0.windows.1
node --version
16.14.0
The text was updated successfully, but these errors were encountered: