Open knoefel opened 2 weeks ago
Same issue here. I didn't investigate why exactly but it is related to:
Similar when running my main Expo app. Tested in Nx 19 macos
Storybook is in its own standalone React Native app. Storybook packages v7.6.10 and v7.6.15 for @storybook/react-native
.
Nx docs https://nx.dev/recipes/storybook/custom-builder-configs#and are outdated, framework
field doesn't exist in StorybookConfig
.
yarn exec nx run expo:start
node:internal/process/promises:289
triggerUncaughtException(err, true /* fromPromise */);
^
[Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
The "@nx/storybook/plugin" plugin threw an error while creating nodes from apps/storybook-rn/.storybook/main.ts:
TypeError: Cannot read properties of undefined (reading 'name')
at getStorybookFramework (/Users/guillem/programacio/codi/cites/nx-expo-next-tamagui/node_modules/@nx/storybook/src/plugins/plugin.js:170:66)
at buildStorybookTargets (/Users/guillem/programacio/codi/cites/nx-expo-next-tamagui/node_modules/@nx/storybook/src/plugins/plugin.js:68:32)
at Array.exports.createNodes (/Users/guillem/programacio/codi/cites/nx-expo-next-tamagui/node_modules/@nx/storybook/src/plugins/plugin.js:53:32)
at /Users/guillem/programacio/codi/cites/nx-expo-next-tamagui/node_modules/nx/src/project-graph/plugins/utils.js:49:27
at async Promise.all (index 0)
I fixed my problem.
My error was a bit different:
Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
ProjectsWithNoNameError: The projects in the following directories have no name provided:
- apps\my-app-one
- apps\my-app-two
- apps\my-app-three
- ...
All of the apps above were related to a specific Nx plugin using target inference.
Nx can inject targets into a project configuration by comparing the projectRoot
computed with the projectRoot
from the list of existing projects .
However, the projectRoot
computed can be different between a Windows environment and a Unix environment.
This is why Nx created the utility normalizePath to avoid that use case:
const projectRoot = normalizePath(join(dirname(configFilePath), '..'));
Current Behavior
After making a build for a Next.js app inside a dockerfile and then afterwards running a command to generate a siemap via
next-sitemap
i get the following errorProjectsWithNoNameError: The projects in the following directories have no name provided:
.I looked inside the dist folder and there is a
package.json
file generated in both folders:When i manually remove this
package.json
files and run the command again it will succeed. I guess these files don't have a name prop which nx expects?Expected Behavior
It's possible to run all commands without removing package.json files. I think this issue could be related to #20959.
GitHub Repo
No response
Steps to Reproduce
As my project is a private repo i can't share the source code.
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
No response