GithubHelp home page GithubHelp logo

Comments (6)

jogelin avatar jogelin commented on August 17, 2024

Same issue here. I didn't investigate why exactly but it is related to:

  • Upgrade to Nx 19
  • Plugin inference activated
  • Windows environments only
  • Server app only

from nx.

guillempuche avatar guillempuche commented on August 17, 2024

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)

from nx.

jogelin avatar jogelin commented on August 17, 2024

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), '..'));

from nx.

FrankFan avatar FrankFan commented on August 17, 2024

blocked by the same issue: The projects in the following directories have no name provided: in Mac

how to solve this ?

from nx.

FrankFan avatar FrankFan commented on August 17, 2024

blocked by the same issue: The projects in the following directories have no name provided: in Mac

how to solve this ?

answer

in nx apps/folder, a react project's there is a lib sub-folder in public folder , but it's package.json file has no name filed , this is the root cause.

from nx.

KranzAklilu avatar KranzAklilu commented on August 17, 2024

Make sure your project.json has something inside {"name": ' "} and run nx reset

from nx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.