Trying to install Angular 2 Material from npm - unrecognized token in source text

前端 未结 3 1872
被撕碎了的回忆
被撕碎了的回忆 2021-02-11 19:24

I try the following command from PowerShell (as Administrator)

npm install @angular2-material

and get the error:

Unrecognized t         


        
3条回答
  •  庸人自扰
    2021-02-11 20:18

    The @ is making PowerShell treat @angular2-material as a variable.

    • You could use cmd.exe (command shell) instead of PowerShell

    or

    • You could surround the package in quotes: e.g., "@angular2-material"

提交回复
热议问题