您好,我正在尝试下载此 npm :https://www.npmjs.com/package/@bam.tech/react-native-image-resizer
但它给了我这个错误
npm install @bam.tech/react-native-image-resizer
At line:1 char:13
+ npm install @bam.tech/react-native-image-resizer
+ ~~~~
The splatting operator '@' cannot be used to reference variables in an expression. '@bam' can be used only as an argument to a
command. To reference variables in an expression use '$bam'.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : SplattingNotPermitted
我已经尝试了一切,我已经更新了 npm 和 rezet 节点模块,但仍然有这个错误
您似乎正在 PowerShell 环境中运行此命令,并且 PowerShell 将“@”符号解释为展开运算符。要解决此问题,您可以尝试在包名称周围使用双引号。这是一个例子:
npm install "@bam.tech/react-native-image-resizer"
通过使用双引号,PowerShell 应正确解释包名称,而不是将其视为展开运算符。尝试运行带双引号的命令,看看是否可以解决问题。