powershell 术语“导出”不被识别

yvfmudvl  于 2023-08-05  发布在  Shell
关注(0)|答案(1)|浏览(116)
export : The term 'export' 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.
At line:1 char:1
+ export PATH=$PWD/node_modules/.bin:$PATH
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (export:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

字符串
我尝试powershell但错误持续

hivapdat

hivapdat1#

如果确实需要这样做,请使用PowerShell功能使其与平台无关。

$ExeDir = Join-Path -Path $(Get-Location) -ChildPath 'node_modules' -AdditionalChildPath '.bin'
$Env:PATH = $ExeDir,$Env:PATH -join [IO.Path]::PathSeparator

字符串

相关问题