Npm scripts error sh: 1: melos: not found
Describe the bug
I am using NPM SCRIPTS, some commands work and for melos script I am getting an error.
Please confirm that this problem is VSCodium-specific
- [x] This bug doesn't happen if I use Microsoft's Visual Studio Code. It only happens in VSCodium.
Please confirm that the issue/resolution isn't already documented
- [x] I checked the Docs page and the Troubleshooting page and my issue is not mentioned there.
To Reproduce Steps to reproduce the behavior:
- Create a dart project with the following
pubspec.yamel
name: tools
environment:
sdk: '>=3.0.0 <4.0.0'
dev_dependencies:
melos: ^3.1.1
- Create
pacakge.jsonfile with melos script
{
"name": "test",
"version": "0.0.1",
"scripts": {
"bootstrap": "melos bootstrap"
}
}
- Run
dart pub global activate melos - Run
dart pub get - In the
EXPLORERbottom part there will beNPM SCRIPTSpart (if it missing try right click in the area and adding it. - Run the bootstrap script.
Expected behavior Script will work
Screenshots
Desktop (please complete the following information):
- OS: Kubuntu 23.10
- Architecture x64
- Version 1.84.2
- App Manager snap
- Sandboxed snap
Additional context Running other commands from NPM SCRIPTS seem to work!. This is my first time using vscodium so I am probably missing something very basic. Wokrs on NPM SCRIPTS from vscode snap as well as directly from terminal. I have only 3 EXTENSIONS installed: Dart, Flutter, YAMEL.
Terminal output:
> [email protected] bootstrap
> melos bootstrap
sh: 1: melos: not found
* The terminal process "/usr/bin/bash '-c', 'npm run bootstrap'" terminated with exit code: 127.
* Terminal will be reused by tasks, press any key to close it.
It seems like a snap issue which use an incorrect PATH
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment, and we'll keep it open. If you have any new additional information, please include it with your comment!
Currently I have stoped using Melos, will close the issue.