invertase / melos

🌋 A tool for managing Dart projects with multiple packages. With IntelliJ and Vscode IDE support. Supports automated versioning, changelogs & publishing via Conventional Commits.
https://melos.invertase.dev/~melos-latest
Apache License 2.0
1.19k stars 207 forks source link

fix: melos can't find sdk in sdkPath #542

Open y-chen opened 1 year ago

y-chen commented 1 year ago

Is there an existing issue for this?

Version

3.1.0

Description

When I run the command melos in the root of my repository I get the error

/Users/<user>/.pub-cache/bin/melos: line 8: dart: command not found

I am using fvm that is working. I activated melos using

fvm dart pub global activate melos

My melos.yaml looks like

name: my_app

packages:
  - melos/apps/*
  - melos/packages/*

sdkPath: .fvm/flutter_sdk

.fvm/flutter_sdk path exists in the repository.

It work if I run fvm flutter pub global run melos.

Steps to reproduce

  1. Configure fvm
  2. Create melos.yaml file
  3. Run fvm dart pub global activate melos
  4. Run melos

The error is thrown

Expected behavior

melos command can find fvm sdk.

Screenshots

No response

Additional context and comments

No response

jiechic commented 1 year ago

because fvm dart isn't on your env path。 dart pub global melos then the melos need dart in env