1

I'm getting this error whenever I run my application. Previously it's working.

error

I tried to remove node_modules/ and package-lock.json and re-run the npm install but I'm still getting the error.

This is my package.json

{
  "name": "vs_admin",
  "version": "1.0.0",
  "description": "",
  "author": "Tech Dev",
  "private": true,
  "scripts": {
    "dev": "NUXT_ENV_STAGE=it nuxt",
    "build": "nuxt build",
    "start": "nuxt start",
    "generate:it": "NUXT_ENV_STAGE=it nuxt generate",
    "generate:staging": "NUXT_ENV_STAGE=staging nuxt generate",
    "generate:uat": "NUXT_ENV_STAGE=uat nuxt generate",
    "generate:production": "NUXT_ENV_STAGE=production nuxt generate",
    "test": "NUXT_ENV_STAGE=test nyc --reporter=lcov --reporter=text-lcov mocha --recursive --required mock-local-storage -r esm"
  },
  "dependencies": {
    "@johmun/vue-tags-input": "^2.0.1",
    "axios": "^0.18.0",
    "bootstrap-vue": "^2.0.0-rc.14",
    "chai": "^4.2.0",
    "config": "^3.0.1",
    "esm": "^3.2.5",
    "jodit-vue": "^1.2.4",
    "luxon": "^1.12.1",
    "mocha": "^6.0.1",
    "nprogress": "^0.2.0",
    "nuxt": "^2.4.3",
    "vue-affix": "^0.5.2",
    "vue-clamp": "^0.2.1",
    "vue-date-pick": "^1.1.0",
    "vue-datetime": "^1.0.0-beta.10",
    "vuedraggable": "^2.17.0",
    "vuejs-noty": "^0.1.3",
    "vuelidate": "^0.7.4",
    "weekstart": "^1.0.0"
  },
  "devDependencies": {
    "dotenv": "^6.2.0",
    "mock-local-storage": "^1.1.8",
    "moxios": "^0.4.0",
    "nodemon": "^1.18.10",
    "nyc": "^13.2.0",
    "sass": "^1.17.4",
    "sass-loader": "^7.1.0",
    "sinon": "^7.3.1"
  }
}

nuxt-config.js

const pkg = require("./package");

if (process.env.NODE_ENV !== "production") require("dotenv").config();

module.exports = {
  mode: "spa",
  head: {
    title: "Visit Singapore - Admin",
    meta: [
      { charset: "utf-8" },
      { name: "viewport", content: "width=device-width, initial-scale=1" },
      { hid: "description", name: "description", content: pkg.description }
    ],
    link: [{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" }]
  },
  router: {
    mode: 'history'
  },
  loading: { color: "#FF0000" },
  css: [
    "~/assets/css/main.scss",
    "~/assets/css/vueDatePick.css",
    "~/assets/css/input-tag.scss",
    "~/assets/css/input-tag.scss",
    "~/assets/css/vuejs-noty.scss",
    "~/assets/css/cards.scss",
    "~/assets/css/nprogress.css"
  ],
  plugins: [
    "~/plugins/vuelidate",
    "~/plugins/global-components",
    "~/plugins/vue-tags-input",
    "~/plugins/vue-clamp",
    "~/plugins/datepicker",
    "~/plugins/vue-draggable",
    "~/plugins/vue-noty",
    "~/plugins/vue-editor",
    "~/plugins/datetimepicker",
    "~/plugins/vue-affix"
  ],
  modules: ["bootstrap-vue/nuxt"],
  build: {
    transpile: ["vue-clamp", "resize-detector"],
    extend(config, ctx) { }
  }
};

6
  • What is you Node version? Commented Jul 13, 2020 at 11:10
  • @RafikFarhad v8.15.1 Commented Jul 14, 2020 at 2:03
  • I upgraded my node version to 12.7.0 and nuxt version to 2.13.3 but still getting the error when I nuxt generate "generate:it": "NUXT_ENV_STAGE=it nuxt build && nuxt export", Commented Jul 14, 2020 at 4:26
  • I get the same using node v8.11.2 and nuxt 2.13.3 Commented Jul 14, 2020 at 8:27
  • Did you clean after node version update? Did your NPM is updated? Commented Jul 14, 2020 at 16:04

1 Answer 1

1

I had the same issue when runnign node v8.10 on Ubuntu. I updated node using: https://askubuntu.com/questions/426750/how-can-i-update-my-nodejs-to-the-latest-version

sudo npm cache clean -f sudo npm install -g n sudo n stable

After i restarted my terminal i had node v12. After that the problem was gone

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.