A
A
Anton2020-01-11 19:05:51
JavaScript
Anton, 2020-01-11 19:05:51

How to rebuild and deploy a vue project?

There is a project written in Bitrix, but with vue connected to it.
My job is to do some tweaking, but after changing a component in vue or adding a new one, there are no changes on the site. I understand that after changing the components, you need to rebuild the project, and then deploy it to the dist folder, but the problem is that I don't know how to do it. As I understand it, everything is already working, the configs are correct, but I'm doing something wrong.
After a long search on the Internet, I found a few commands that I understand can help.
For example:
npm run build
The output is:

sh: ......./node_modules/.bin/vue-cli-service: Permission denied

Tried running as admin with sudo but same result.
I tried to bind the desired owner through chown, as described on the Internet, but the result is the same.
The question is, how is it usually done? Am I using a completely different command, or should I use it for my purposes and continue to fight with permissions?
config:
{
  "name": "vue-project",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "watch": "vue-cli-service build --watch",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "@fancyapps/fancybox": "^3.5.7",
    "core-js": "^2.6.5",
    "inputmask": "^4.0.8",
    "is_js": "^0.9.0",
    "jquery": "^3.4.1",
    "js-cookie": "^2.2.0",
    "lodash": "^4.17.11",
    "moment": "^2.24.0",
    "normalize.css": "^8.0.1",
    "postcss-flexbugs-fixes": "^4.1.0",
    "postcss-quantity-queries": "^0.5.0",
    "postcss-short": "^5.0.0",
    "sass-loader": "^7.1.0",
    "vue": "^2.6.10",
    "vuex": "^3.1.1"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "^3.8.0",
    "@vue/cli-plugin-eslint": "^3.8.0",
    "@vue/cli-service": "^3.8.0",
    "babel-eslint": "^10.0.1",
    "eslint": "^5.16.0",
    "eslint-plugin-vue": "^5.0.0",
    "node-sass": "^4.12.0",
    "vue-template-compiler": "^2.6.10"
  },
  "eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/essential",
      "eslint:recommended"
    ],
    "rules": {},
    "parserOptions": {
      "parser": "babel-eslint"
    }
  },
  "postcss": {
    "plugins": {
      "autoprefixer": {}
    }
  },
  "browserslist": [
    "> 1%",
    "last 2 versions"
  ]
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2020-01-12
Pochachalov @nicenice

Solution in the comments.
I tried to run recursively chmod -R +x on node_modules: the following error came out. Further, following the traces of this error, I found the following solution from Google:

rm -rf node_modules
npm install
npm run build

And everything worked. Thanks to everyone who replied in the comments to the question!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question