Sunday, 10 November 2019

Beginner help: Unable to run vue command despite it being present in node_modules in local directory

I'm very new to JS and after doing a bit of basics, wanted to jump into tyying Vue. However, I'm really struggling to get things set up. After installing node and npm, to set up Vue on my system, I did:npm initWrote basic details into package.jsonInstalled vue LOCALLY - using npm install vueAlso installed vue cli: npm install @vue/cliAfter doing all this, I decided to see the package installed locally, so I ran npm list --depth 0. The output was:flask-vue-app@1.0.0 /home/XXX/others/random/flask-vue-spa ├── @vue/cli@4.0.5 └── vue@2.6.10I also ran npm root just to see the output - and based on my understanding, it confirms that the installed packages are installed locally within node_modules of current directory. Output of npm root:/home/XXX/others/random/flask-vue-spa/node_modulesAfter all this, when I do vue --version or just vue, I get: Command 'vue' not foundWhere am I going wrong in the setup? Did I miss a step or do something improperly? I'd really appreciate help on this

Submitted November 10, 2019 at 10:13PM by ThiccShadyy

No comments:

Post a Comment