Code Monkey home page Code Monkey logo

Comments (4)

gdomiciano avatar gdomiciano commented on May 18, 2024 2

Hey Guys,
I've fixed it using @nuxt/axios as a dependency instead of a dev dependency in my package.json

So, now my package.json looks like:

"dependencies": {
    "@nuxtjs/axios": "^2.3.0",
    "@nuxtjs/proxy": "^1.1.1",
    "nuxt": "^1.0.0-alpha.4",
    "vue-loader": "^12.2.1",
    "vue-meta": "^1.0.4",
    "vue-router": "^2.5.3",
    "vue-ssr-html-stream": "^2.2.0",
    "vue-style-loader": "^2.0.0"
  },
  "devDependencies": {...},

instead of:

"dependencies": {
    "nuxt": "^1.0.0-alpha.4",
    "vue-loader": "^12.2.1",
    "vue-meta": "^1.0.4",
    "vue-router": "^2.5.3",
    "vue-ssr-html-stream": "^2.2.0",
    "vue-style-loader": "^2.0.0"
  },
  "devDependencies": {
    "@nuxtjs/axios": "^2.3.0",
    "@nuxtjs/proxy": "^1.1.1",
    ...
  },

from legacy-modules.

pi0 avatar pi0 commented on May 18, 2024

Hey. Are you sure @nuxtjs/axios dependency is installed in package.json? Technically there shouldn't be any difference between generate and build.

from legacy-modules.

pstachula-dev avatar pstachula-dev commented on May 18, 2024

Yes dependency is installed, and when I run npm run dev it works, but when I run nuxt generate for production version I have an error.

from legacy-modules.

anteriovieira avatar anteriovieira commented on May 18, 2024

Thanks @gdomiciano

from legacy-modules.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.