Coder Social home page Coder Social logo

Comments (10)

rohitsrao avatar rohitsrao commented on June 20, 2024 1

Thanks. Here you go.

pnpm nx g @nxrocks/nx-flutter:create --verbose

>  NX  Generating @nxrocks/nx-flutter:project

βœ” What name would you like to use? Β· test
βœ” What package name would you like to use? Β· com.test.test
βœ” What is the project about? Β· testing flutter app creation using nx with fvm
βœ” Which type of Flutter project would you like to create? Β· app
βœ” Are you using Flutter Version Manager (fvm)? (y/N) Β· true
βœ” Which platforms would you like to use? Β· android, ios, linux, windows, macos, web
βœ” Which Android language would you like to use? Β· kotlin
βœ” Which iOS language would you like to use? Β· swift
Generating Flutter project with following options : --project-name=test --org=com.test.test --description="testing flutter app creation using nx with fvm" --android-language=kotlin --ios-language=swift --template=app --platforms="android,ios,linux,windows,macos,web" ...

 >  NX   'fvm' was not found on your system's PATH.

   Please make sure you have installed it correctly.
   πŸ‘‰πŸΎ https://fvm.app/docs/getting_started/installation

Error: 'fvm' was not found on your system's PATH.
Please make sure you have installed it correctly.
πŸ‘‰πŸΎ https://fvm.app/docs/getting_started/installation
    at /Users/rohitsrao/Downloads/test-fvm/node_modules/.pnpm/@[email protected]_zqbjo4rte6cxok4y43iraq25ve/node_modules/@nxrocks/nx-flutter/src/generators/project/lib/generate-project.js:13:19
    at Generator.next (<anonymous>)
    at /Users/rohitsrao/Downloads/test-fvm/node_modules/.pnpm/[email protected]/node_modules/tslib/tslib.js:167:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/Users/rohitsrao/Downloads/test-fvm/node_modules/.pnpm/[email protected]/node_modules/tslib/tslib.js:163:16)
    at generateFlutterProject (/Users/rohitsrao/Downloads/test-fvm/node_modules/.pnpm/@[email protected]_zqbjo4rte6cxok4y43iraq25ve/node_modules/@nxrocks/nx-flutter/src/generators/project/lib/generate-project.js:9:20)
    at /Users/rohitsrao/Downloads/test-fvm/node_modules/.pnpm/@[email protected]_zqbjo4rte6cxok4y43iraq25ve/node_modules/@nxrocks/nx-flutter/src/generators/project/generator.js:48:48
    at Generator.next (<anonymous>)
    at fulfilled (/Users/rohitsrao/Downloads/test-fvm/node_modules/.pnpm/[email protected]/node_modules/tslib/tslib.js:164:62)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

from nxrocks.

tinesoft avatar tinesoft commented on June 20, 2024 1

Ok thanks!

I'll have a look tonight.
Stay tuned!

from nxrocks.

tinesoft avatar tinesoft commented on June 20, 2024 1

Nx-flutter is a dev dependency in your workspace, so it can/must be installed in the root pacakage json file, as you did.

from nxrocks.

rohitsrao avatar rohitsrao commented on June 20, 2024 1

@tinesoft Thanks. It is working now.

from nxrocks.

tinesoft avatar tinesoft commented on June 20, 2024

Hi @rohitsrao ,

Thanks for using the plugin and for reporting this.

Can you confirm that fvm is globally found/accessible by running fvm --version in the same terminal where you ran the pnpm nx g @nxrocks/nx-flutter:create command?

from nxrocks.

rohitsrao avatar rohitsrao commented on June 20, 2024

Hi @tinesoft .

Thanks for the fast reply.

I am able to do that and get the following output

fvm --version
2.4.1

from nxrocks.

tinesoft avatar tinesoft commented on June 20, 2024

Humm πŸ€”...this looks like a bug indeed.

Can you add the --verbose flag to the pnpm nx g @nxrocks/nx-flutter:create command and paste in the full output?

I'll have a look at it

from nxrocks.

rohitsrao avatar rohitsrao commented on June 20, 2024

Should nx-flutter be installed globally ?

When I ran pnpm install --save-dev @nxrocks/nx-flutter I got the following error

 ERR_PNPM_ADDING_TO_ROOT  Running this command will add the dependency to the workspace root, which might not be what you want - if you really meant it, make it explicit by running this command again with the -w flag (or --workspace-root). If you don't want to see this warning anymore, you may set the ignore-workspace-root-check setting to true.

So I installed it with pnpm install -w --save-dev @nxrocks/nx-flutter in my monorepo folder.

I installed it globally in a different attempt but I get the following error

pnpm nx g @nxrocks/nx-flutter:create --verbose

 >  NX   Unable to resolve @nxrocks/nx-flutter:create.

   unable to find tsconfig.base.json or tsconfig.json

Error: Unable to resolve @nxrocks/nx-flutter:create.
unable to find tsconfig.base.json or tsconfig.json
    at Workspaces.readGenerator (/Users/rohitsrao/Downloads/test-fvm/node_modules/.pnpm/[email protected]/node_modules/nx/src/config/workspaces.js:151:19)
    at Object.<anonymous> (/Users/rohitsrao/Downloads/test-fvm/node_modules/.pnpm/[email protected]/node_modules/nx/src/command-line/generate.js:226:209)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/rohitsrao/Downloads/test-fvm/node_modules/.pnpm/[email protected]/node_modules/tslib/tslib.js:164:62)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

from nxrocks.

tinesoft avatar tinesoft commented on June 20, 2024

Hi @rohitsrao

Ok I've just re-read the installation instruction for fvm/flutter

https://fvm.app/docs/getting_started/installation/

Recommendation
We recommend install Flutter SDK globally using the official installation guide HERE. This will be the main version of Flutter across your machine.

Use FVM to manage the Flutter SDK version for your projects.

(emphasis are mine)

This means you need to install a main version of flutter. Then use fvm install/ fvm use <version> to install/use a specific version of flutter within your project.

And the the command to use to check the right setup is fvm flutter --version (and not just fvm --version)

Can you try that please and let me know?

from nxrocks.

tinesoft avatar tinesoft commented on June 20, 2024

Awesome!

I'm closing this then

from nxrocks.

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.