2

npm run build error!

I try all solutions for this problem but still not able to solve this. Many times i reinstall npm but not get proper solution (Laravel 8 and Vue js) enter image description here

My package.json Code

{
    "private": true,
    "scripts": {
        "dev": "npm run development",
        "development": "mix",
        "watch": "mix watch",
        "watch-poll": "mix watch -- --watch-options-poll=1000",
        "hot": "mix watch --hot",
        "prod": "npm run production",
        "production": "mix --production",
        "serve": "vue-cli-service serve",
        "build": "vue-cli-service build"
    },
    "devDependencies": {
        "@webpack-cli/init": "^1.1.3",
        "axios": "^0.21.1",
        "babel-loader": "^8.2.2",
        "bootstrap": "^4.6.0",
        "jquery": "^3.6",
        "laravel-mix": "^6.0.13",
        "lodash": "^4.17.21",
        "popper.js": "^1.12",
        "postcss": "^8.2.8",
        "resolve-url-loader": "^3.1.2",
        "sass": "^1.32.8",
        "sass-loader": "^11.0.1",
        "vue": "^2.6.12",
        "vue-loader": "^15.9.6",
        "vue-template-compiler": "^2.6.12",
        "webpack": "^5.28.0",
        "webpack-cli": "^4.6.0"
    },
    "dependencies": {
        "vue": "^2.6.12",
        "vue-router": "^3.5.1"
    }
}
2
  • run this command npm install -g @vue/cli or update -g @vue/cli Commented Mar 28, 2021 at 8:02
  • Tried both the commands and still facing the same problem Commented May 22, 2021 at 3:12

1 Answer 1

2

I created a src folder(inside root) with a blank main.js file and it worked for me: reference is here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.