1👍
✅
Maybe to give some insight on the Topic.
npm run “build” calls the script via command line defined in the package.json at the scripts object:
"scripts": {
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
},
It looks like that the cross-env command is not recognized as command therefore i suggest you install Crossenv from npm, if not already done so
Depending on your OS other steps might be necessary.
npm install --save-dev cross-env
0👍
In my sanario I was not having VUE JS CLi installed on to my server thus
// to install vue on ubuntu
npm install -g @vue/cli
// check if it was installed successfully
vue --version
@vue/cli 4.1.2
After that you can build VUE app
npm install
npm run build
-1👍
Usualy it means that you need run npm install before build your application.
Try this way:
$ npm install
$ npm run build
Source:stackexchange.com