chocolatey / choco

Chocolatey - the package manager for Windows
https://chocolatey.org
Other
10.36k stars 902 forks source link

ERROR: Cannot bind argument to parameter 'Path' because it is null. #3310

Closed hwhsu1231 closed 1 year ago

hwhsu1231 commented 1 year ago

Checklist

What You Are Seeing?

Failed to install sass package with the following error message:

Click to expand log ```cmd C:\Users\hwhsu1231>gsudo choco install sass Chocolatey v2.2.2 3 validations performed. 2 success(es), 1 warning(s), and 0 error(s). Validation Warnings: - System Cache directory is not locked down to administrators. Remove the directory 'C:\ProgramData\ChocolateyHttpCache' to have Chocolatey CLI create it with the proper permissions. Installing the following packages: sass By installing, you accept licenses for the packages. Progress: Downloading dart-sdk 3.1.0... 100% dart-sdk v3.1.0 [Approved] dart-sdk package files install completed. Performing other installation steps. The package dart-sdk wants to run 'chocolateyInstall.ps1'. Note: If you don't run this script, the installation will fail. Note: To confirm automatically next time, use '-y' or consider: choco feature enable -n allowGlobalConfirmation Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): y Cannot find drive. A drive with the name 'M' does not exist. ERROR: Cannot bind argument to parameter 'Path' because it is null. The install of dart-sdk was NOT successful. Error while running 'C:\ProgramData\chocolatey\lib\dart-sdk\chocolateyInstall.ps1'. See log for details. Progress: Downloading sass 1.66.1... 100% sass v1.66.1 [Approved] sass package files install completed. Performing other installation steps. The package sass wants to run 'chocolateyInstall.ps1'. Note: If you don't run this script, the installation will fail. Note: To confirm automatically next time, use '-y' or consider: choco feature enable -n allowGlobalConfirmation Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): y Fetching Dart dependencies... ERROR: The term 'dart' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. The install of sass was NOT successful. Error while running 'C:\ProgramData\chocolatey\lib\sass\tools\chocolateyInstall.ps1'. See log for details. Chocolatey installed 0/2 packages. 2 packages failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). Failures - dart-sdk (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\dart-sdk\chocolateyInstall.ps1'. See log for details. - sass (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\sass\tools\chocolateyInstall.ps1'. See log for details. C:\Users\hwhsu1231> ```

What is Expected?

Install it successfully.

How Did You Get This To Happen?

  1. I ran this command gsudo choco install sass

System Details

Installed Packages

Chocolatey v2.2.2
chocolatey 2.2.2
chocolatey-compatibility.extension 1.0.0
chocolatey-core.extension 1.4.0
chocolatey-dotnetfx.extension 1.0.1
chocolateygui 2.1.0
chocolatey-windowsupdate.extension 1.0.5
dotnetcore-sdk 3.1.404
dotnetfx 4.8.0.20220524
gnuwin32-coreutils.install 5.3.0
gperf 3.1.0
gzip 1.3.12
hugo-extended 0.117.0
KB2533623 2.0.0
KB2919355 1.0.20160915
KB2919442 1.0.20160915
KB2999226 1.0.20181019
KB3033929 1.0.5
KB3035131 1.0.3
KB3063858 1.0.0
ninja 1.11.1
nodejs-lts 18.17.0
NTop.Portable 0.3.4
strawberryperl 5.26.3.1
vcredist140 14.36.32532
vcredist2015 14.0.24215.20170201
Wget 1.21.4
winflexbison 2.4.9.20170215
xsltproc 1.1.28
28 packages installed.

Output Log

https://gist.github.com/hwhsu1231/c0e831cd445ed48d28fd6ddbcfabafd8

Additional Context

No response

pauby commented 1 year ago

The checkbox at the top of the first comment is ticked indicating this is not an issue with a specific package. This is an issue installing the sass package because the dart package fails:

Cannot find drive. A drive with the name 'M' does not exist. ERROR: Cannot bind argument to parameter 'Path' because it is null.

Please contact the package maintainers for help with this error.