Search code examples
vuejs2windows-scriptingvue-cli

Windows Script Error in Vue-CLI


I have switched to Vue.js. I created a new project in Vue CLI. I am getting an error from Windows Script Host with source error : "Microsoft JScript compilation error on Line 1469".


Solution

  • Tldr; Make sure your path is pointing to the Vue binary, not Vue.js

    Very late, but for those stumbling upon this I think I might have the answer, which I've inferred from this comment. Basically the issue is that Windows is trying to run a Javascript file when it should be running a binary; Windows is trying to run "vue.js" when it should be running "vue". When I typed vue --version and tried to run a globally installed version of vue, I would get the aforementioned error.

    Windows JScript Error

    To fix this I checked my path (make sure you know how to edit this before continuing) and noticed that it pointed to a bin folder (which commonly holds binary files). However, the only file in the folder was "vue.js".

    Incorrect path to Vue Cli

    After a bit of digging I found the vue binary to be in C:\Users\dan\AppData\Roaming\npm, not C:\Users\dan\AppData\Roaming\npm\node_modules\@vue\cli\bin. After changing the path to the folder with the binary file, everything works!

    Working Vue CLI