-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Running migrations to 19.6.0 fails - Cannot read properties of undefined (reading 'data') #27470
Comments
My migration run also failed, but for @nx/cypress
|
Same here, it was easy to fix by making sure that on line 13 of the script |
I still have the same issue when upgrading from 18.3.3 to 19.6.1:
|
|
@BabakScript @the-ult thanks for the info! The fix missed the migration you're reporting (it fixed others with a similar issue). I'm reopening this to track it and I'll send a fix for it. |
@BabakScript @the-ult could you please share the contents of your |
/* eslint-disable unicorn/prefer-module */
import { nxE2EPreset } from '@nx/playwright/preset';
import { defineConfig, devices } from '@playwright/test';
import { workspaceRoot } from '@nx/devkit';
// For CI, you may want to set BASE_URL to the deployed application.
const baseURL = process.env['BASE_URL'] ?? 'http://localhost:4200';
/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// require('dotenv').config();
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
...nxE2EPreset(__filename, {
testDir: './src',
}),
retries: 2,
snapshotPathTemplate: '{testDir}/__snapshots__/{testFilePath}/{arg}{ext}',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
expect: {
toHaveScreenshot: {
threshold: 0.15,
maxDiffPixelRatio: 0.025,
maxDiffPixels: 0.2,
},
toMatchSnapshot: {
threshold: 0.15,
maxDiffPixelRatio: 0.025,
// maxDiffPixels: 0.2,
},
},
use: {
baseURL,
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
viewport: { width: 1920, height: 1080 },
},
/* Run your local dev server before starting the tests */
webServer: {
command: 'npx nx serve expo',
url: 'http://localhost:4200',
reuseExistingServer: !process.env['CI'],
cwd: workspaceRoot,
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'], viewport: { width: 1920, height: 1080 } },
},
],
}); |
Mmm, I can't reproduce the issue with that config as long as the That said, the migration needs to gracefully handle a wrong/invalid command pointing to a non-existing project or running a server that doesn't use Nx to run. I can fix that, but I'd like to understand first the exact issue you're having to rule out any other scenario we might be missing. |
@leosvelperez Sure sure. I have two. This is the first one:
And:
|
there is 1 other project. Which has:
So the only difference seems to be the [edit] Just ran the migration again.. with |
Yeah, I see the issue in the migration not considering extra flags after the project name.
Thanks! |
@BabakScript I haven't been able to reproduce your issue. Would you be able to share your repo or create a repo where the issue can be reproduced? |
@leosvelperez My current repo is huge but I can prepare a repo to reproduce the issue, but give me time. I'll do it on the weekend. |
@BabakScript, we merged a fix that covers several things I found and "might" address the issue you're facing. Please try again once the fix is released (it should be included in v19.6.2). |
<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #27470 (cherry picked from commit 2ffec0a)
@leosvelperez @FrozenPandaz I checked with the latest version v.19.6.2 and I still have the same issue:
My report:
Maybe related to this: #26011 |
@BabakScript, your issue seems to be different than the one reported here, and we'll need a way to reproduce it. Please open a new issue and provide a reproduction. You can tag me and I'll take a look. |
My migration to 19.6.2 fails on Storybook v8 - it searches '@nx/react/plugins/storybook/package.json' due to getAbsolutePath('@nx/react/plugins/storybook') |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
After migration to latest nx version
nx migrate latest
(19.6.0), the command to run the migrationsnx migrate --run-migrations
fails, please see failure logs section.Expected Behavior
nx migrate --run-migrations
finishes without errorGitHub Repo
No response
Steps to Reproduce
nx migrate latest
nx migrate --run-migrations
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: