You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to develop a command line package so I followed these steps:
dart create --template=package-simple package_name
or dart create -t console-full package_name
(Both ends with the same results)
then activating the package globally with:
dart pub global activate --source path $(pwd)
note that I didn't find anything in the documentation about --source path actual_path but whenever I use the command only with --source actual_path I get the following:
"/Users/user/Desktop/Workspace/package_name" is not an allowed value for option "source".
So after successfully activating the package I tried to run it using:
package_name
But I got this:
zsh: command not found: package_name
Found out that the documentation here is outdated and after searching the local directory I found the actual directory is global_packages not bin, and so I've changed it.
Now when I try package_name I get: zsh: permission denied: package_name
After investigation I found that package_name is a directory in the global_packages directory and it only contains pubspec.lock so I've tried chmod a+x on the file and the directory with no avail.
Further investigation the global_packages contained another package intl_utils inside I found:
.packages incremental
.dart_tool bin pubspec.lock
But running intl_utils on the terminal too get's me the same error: zsh: permission denied: intl_utils
I didn't install the package manually but the VS Code extension Flutter Intl did and it seems to work perfectly fine.
Now I have two questions:
permission denied on what exactly since the Flutter Intl extension works perfectly???
I have a file in my package bin/my_package.dart but it didn't go there, am I doing something wrong?
I'm running dart through flutter:
Flutter (Channel master, 2.13.0-0.0.pre.90, on macOS 12.3 21E230 darwin-x64, locale en-US)
dart --version
Dart SDK version: 2.17.0-202.0.dev (dev) (Thu Mar 10 20:55:41 2022 -0800) on "macos_x64"
OS: MacOs Monterey 12.3 (21E230)
The text was updated successfully, but these errors were encountered:
I'm trying to develop a command line package so I followed these steps:
dart create --template=package-simple package_name
or
dart create -t console-full package_name
(Both ends with the same results)
then activating the package globally with:
dart pub global activate --source path $(pwd)
note that I didn't find anything in the documentation about
--source path actual_path
but whenever I use the command only with--source actual_path
I get the following:"/Users/user/Desktop/Workspace/package_name" is not an allowed value for option "source".
So after successfully activating the package I tried to run it using:
package_name
But I got this:
zsh: command not found: package_name
Found out that the documentation here is outdated and after searching the local directory I found the actual directory is
global_packages
notbin
, and so I've changed it.Now when I try
package_name
I get:zsh: permission denied: package_name
After investigation I found that
package_name
is a directory in theglobal_packages
directory and it only containspubspec.lock
so I've triedchmod a+x
on the file and the directory with no avail.Further investigation the
global_packages
contained another packageintl_utils
inside I found:But running
intl_utils
on the terminal too get's me the same error:zsh: permission denied: intl_utils
I didn't install the package manually but the VS Code extension Flutter Intl did and it seems to work perfectly fine.
Now I have two questions:
bin/my_package.dart
but it didn't go there, am I doing something wrong?I'm running dart through flutter:
Flutter (Channel master, 2.13.0-0.0.pre.90, on macOS 12.3 21E230 darwin-x64, locale en-US)
dart --version
Dart SDK version: 2.17.0-202.0.dev (dev) (Thu Mar 10 20:55:41 2022 -0800) on "macos_x64"
OS: MacOs Monterey 12.3 (21E230)
The text was updated successfully, but these errors were encountered: