Command vue init requires a global addon

前端 未结 3 597
忘了有多久
忘了有多久 2021-02-13 03:34

When I tried to vue init webpack test-app, I got the following error:

Command vue init requires a global addon to be installed.
Please run npm in         


        
3条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-13 04:15

    From the vue-cli website, Vue CLI 3 uses the same vue binary , so it overwrites Vue CLI 2 (vue-cli). So if you need the legacy vue inityou should install the global bridge

    npm install -g @vue/cli-init
    # vue init now works exactly the same as vue-cli@2.x
    

提交回复
热议问题