nx
nx copied to clipboard
Issue while migrating storybook from `v16.4.3` to `v16.5.0`
Current Behavior
when I run pnpm exec migrate --run-migrations
I get this issue :
> NX Failed to run update-16-5-0 from @nx/storybook. This workspace is NOT up to date!
> NX Cannot read properties of undefined (reading 'length')
TypeError: Cannot read properties of undefined (reading 'length')
at /Users/louislecouturier/Documents/Resply/code/resply/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected][email protected]/node_modules/@nx/storybook/src/generators/configuration/lib/util-functions.js:459:44
at updateJson (/Users/louislecouturier/Documents/Resply/code/resply/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/nx/src/generators/utils/json.js:45:26)
at renameAndMoveOldTsConfig (/Users/louislecouturier/Documents/Resply/code/resply/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected][email protected]/node_modules/@nx/storybook/src/generators/configuration/lib/util-functions.js:453:33)
at /Users/louislecouturier/Documents/Resply/code/resply/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected][email protected]/node_modules/@nx/storybook/src/migrations/update-16-5-0/move-storybook-tsconfig.js:16:59
at forEachProjectConfig (/Users/louislecouturier/Documents/Resply/code/resply/node_modules/.pnpm/@[email protected][email protected]/node_modules/@nx/devkit/src/generators/executor-options-utils.js:38:17)
at forEachExecutorOptions (/Users/louislecouturier/Documents/Resply/code/resply/node_modules/.pnpm/@[email protected][email protected]/node_modules/@nx/devkit/src/generators/executor-options-utils.js:18:5)
at /Users/louislecouturier/Documents/Resply/code/resply/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected][email protected]/node_modules/@nx/storybook/src/migrations/update-16-5-0/move-storybook-tsconfig.js:9:61
at Generator.next (<anonymous>)
at /Users/louislecouturier/Documents/Resply/code/resply/node_modules/.pnpm/[email protected]/node_modules/tslib/tslib.js:167:75
at new Promise (<anonymous>)
Command failed: pnpm exec nx _migrate --run-migrations --verbose
> NX Command failed: pnpm exec nx migrate --run-migrations --verbose
Error: Command failed: pnpm exec nx migrate --run-migrations --verbose
at checkExecSyncError (node:child_process:885:11)
at execSync (node:child_process:957:15)
at runNxSync (/private/var/folders/85/04dxvd3x7wsbz88m2jf0z4000000gn/T/tmp-3510-E1HJJGyppwqu/node_modules/.pnpm/[email protected]/node_modules/nx/src/utils/child-process.js:26:34)
at /private/var/folders/85/04dxvd3x7wsbz88m2jf0z4000000gn/T/tmp-3510-E1HJJGyppwqu/node_modules/.pnpm/[email protected]/node_modules/nx/src/command-line/migrate/migrate.js:972:43
at Generator.next (<anonymous>)
at /private/var/folders/85/04dxvd3x7wsbz88m2jf0z4000000gn/T/tmp-3510-E1HJJGyppwqu/node_modules/.pnpm/[email protected]/node_modules/tslib/tslib.js:169:75
at new Promise (<anonymous>)
at Object.__awaiter (/private/var/folders/85/04dxvd3x7wsbz88m2jf0z4000000gn/T/tmp-3510-E1HJJGyppwqu/node_modules/.pnpm/[email protected]/node_modules/tslib/tslib.js:165:16)
at runMigrations (/private/var/folders/85/04dxvd3x7wsbz88m2jf0z4000000gn/T/tmp-3510-E1HJJGyppwqu/node_modules/.pnpm/[email protected]/node_modules/nx/src/command-line/migrate/migrate.js:965:20)
Command failed: /var/folders/85/04dxvd3x7wsbz88m2jf0z4000000gn/T/tmp-3510-E1HJJGyppwqu/node_modules/.bin/nx _migrate --run-migrations --verbose
Expected Behavior
execute these migrations without issues
{
"migrations": [
{
"cli": "nx",
"version": "16.5.0-beta.0",
"description": "Move .storybook/tsconfig.json to tsconfig.storybook.json for non-Angular projects.",
"factory": "./src/migrations/update-16-5-0/move-storybook-tsconfig",
"package": "@nx/storybook",
"name": "update-16-5-0"
},
{
"cli": "nx",
"version": "16.5.0-beta.2",
"description": "Add test-setup.ts to ignored files in production input",
"implementation": "./src/migrations/update-16-5-0/add-test-setup-to-inputs-ignore",
"package": "@nx/jest",
"name": "add-test-setup-to-inputs-ignore"
}
]
}
GitHub Repo
No response
Steps to Reproduce
- having a 16.4.3 repo using storybook libraries
- Try migrating to v16.5.0
Nx Report
Node : 18.16.0
OS : darwin-arm64
pnpm : 8.6.5
nx : 16.5.0
@nx/js : 16.5.0
@nx/jest : 16.5.0
@nx/workspace : 16.5.0
@nx/cypress : 16.5.0
@nx/devkit : 16.5.0
@nx/nest : 16.5.0
@nx/next : 16.5.0
@nx/node : 16.5.0
@nx/react : 16.5.0
@nx/storybook : 16.5.0
@nx/vite : 16.5.0
@nx/web : 16.5.0
@nx/webpack : 16.5.0
nx-cloud : 16.0.5
typescript : 5.1.6
---------------------------------------
Local workspace plugins:
@resply/shared/utils
@resply/shared/hooks
Failure Logs
> NX Running 'pnpm install --no-frozen-lockfile' to make sure necessary packages are installed
Lockfile is up to date, resolution step is skipped
Already up to date
Done in 1.1s
> NX Running migrations from 'migrations.json'
> NX Failed to run update-16-5-0 from @nx/storybook. This workspace is NOT up to date!
> NX Cannot read properties of undefined (reading 'length')
TypeError: Cannot read properties of undefined (reading 'length')
at /Users/louislecouturier/Documents/Resply/code/resply/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected][email protected]/node_modules/@nx/storybook/src/generators/configuration/lib/util-functions.js:459:44
at updateJson (/Users/louislecouturier/Documents/Resply/code/resply/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/nx/src/generators/utils/json.js:45:26)
at renameAndMoveOldTsConfig (/Users/louislecouturier/Documents/Resply/code/resply/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected][email protected]/node_modules/@nx/storybook/src/generators/configuration/lib/util-functions.js:453:33)
at /Users/louislecouturier/Documents/Resply/code/resply/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected][email protected]/node_modules/@nx/storybook/src/migrations/update-16-5-0/move-storybook-tsconfig.js:16:59
at forEachProjectConfig (/Users/louislecouturier/Documents/Resply/code/resply/node_modules/.pnpm/@[email protected][email protected]/node_modules/@nx/devkit/src/generators/executor-options-utils.js:38:17)
at forEachExecutorOptions (/Users/louislecouturier/Documents/Resply/code/resply/node_modules/.pnpm/@[email protected][email protected]/node_modules/@nx/devkit/src/generators/executor-options-utils.js:18:5)
at /Users/louislecouturier/Documents/Resply/code/resply/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected][email protected]/node_modules/@nx/storybook/src/migrations/update-16-5-0/move-storybook-tsconfig.js:9:61
at Generator.next (<anonymous>)
at /Users/louislecouturier/Documents/Resply/code/resply/node_modules/.pnpm/[email protected]/node_modules/tslib/tslib.js:167:75
at new Promise (<anonymous>)
Command failed: pnpm exec nx _migrate --run-migrations --verbose
> NX Command failed: pnpm exec nx migrate --run-migrations --verbose
Error: Command failed: pnpm exec nx migrate --run-migrations --verbose
at checkExecSyncError (node:child_process:885:11)
at execSync (node:child_process:957:15)
at runNxSync (/private/var/folders/85/04dxvd3x7wsbz88m2jf0z4000000gn/T/tmp-3510-E1HJJGyppwqu/node_modules/.pnpm/[email protected]/node_modules/nx/src/utils/child-process.js:26:34)
at /private/var/folders/85/04dxvd3x7wsbz88m2jf0z4000000gn/T/tmp-3510-E1HJJGyppwqu/node_modules/.pnpm/[email protected]/node_modules/nx/src/command-line/migrate/migrate.js:972:43
at Generator.next (<anonymous>)
at /private/var/folders/85/04dxvd3x7wsbz88m2jf0z4000000gn/T/tmp-3510-E1HJJGyppwqu/node_modules/.pnpm/[email protected]/node_modules/tslib/tslib.js:169:75
at new Promise (<anonymous>)
at Object.__awaiter (/private/var/folders/85/04dxvd3x7wsbz88m2jf0z4000000gn/T/tmp-3510-E1HJJGyppwqu/node_modules/.pnpm/[email protected]/node_modules/tslib/tslib.js:165:16)
at runMigrations (/private/var/folders/85/04dxvd3x7wsbz88m2jf0z4000000gn/T/tmp-3510-E1HJJGyppwqu/node_modules/.pnpm/[email protected]/node_modules/nx/src/command-line/migrate/migrate.js:965:20)
Command failed: /var/folders/85/04dxvd3x7wsbz88m2jf0z4000000gn/T/tmp-3510-E1HJJGyppwqu/node_modules/.bin/nx _migrate --run-migrations --verbose
Operating System
- [X] macOS
- [ ] Linux
- [ ] Windows
- [ ] Other (Please specify)
Additional Information
No response