Comments (10)
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.
Ok thanks!
I'll have a look tonight.
Stay tuned!
from nxrocks.
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.
@tinesoft Thanks. It is working now.
from nxrocks.
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.
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.
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.
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.
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.
Awesome!
I'm closing this then
from nxrocks.
Related Issues (20)
- A way to execute custom Gradle tasks HOT 1
- [Bug] does not support schematics HOT 5
- Adopting Nx to SpringBoot MonoRepo's HOT 1
- Run arguments on project level are not pass to ./mvnw spring-boot:run only the ones that are coded to the project.json HOT 5
- [Feature] Configuration Variants HOT 1
- [Feature] (nx-spring-boot) Add Support for Java 21 HOT 2
- [chore] Reduce code smells reported by Sonarcloud
- [Feature] Make sure e2e + smoke tests pass on all OS
- Linking is failing with nx-spring-boot link command [Bug] HOT 1
- [bug] Spring packages are not cached HOT 1
- [Feature] Update plugins to support Nx 17 HOT 14
- [Bug] Support for nx v17.x.x HOT 6
- Executors not working in a multi-module project with more than one level of folders HOT 12
- [Feature] : support java 21 HOT 5
- [Question] Maven dependency management for monorepo libs HOT 16
- [Feature] Run custom Maven commands by nx-spring-boot HOT 2
- [Bug] create-nx-spring-boot fails to run HOT 3
- [Bug] createNodesFor is not a function since @nxrocks/nx-spring-boot 9.3.0 HOT 8
- Cached projects are only restored the "target" folder but not the ~/.m2/repository folder HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nxrocks.