Activities

my3188

my3188 posted a new question

docs •

An error occurred during installation

λ npm init nuxt-app nuxt007

create-nuxt-app v2.11.1
✨ Generating Nuxt.js project in nuxt007
? Project name nuxt007
? Project description My great Nuxt.js project
? Author name \alex
? Choose the package manager Npm
? Choose UI framework Element
? Choose custom server framework Koa
? Choose Nuxt.js modules Axios
? Choose linting tools Prettier
? Choose test framework None
? Choose rendering mode Universal (SSR)
? Choose development tools jsconfig.json (Recommended for VS Code)
Trace: SyntaxError: Unexpected token y in JSON at position 104
at JSON.parse (<anonymous>)
at C:\Users\alex1\AppData\Roaming\npm\nodemodules\create-nuxt-app\nodemodules\sao\lib\runActions.js:101:31 at Array.map (<anonymous>) at C:\Users\alex\AppData\Roaming\npm\nodemodules\create-nuxt-app\nodemodules\sao\lib\runActions.js:97:30 at C:\Users\alex\AppData\Roaming\npm\nodemodules\create-nuxt-app\nodemodules\majo\dist\majo.cjs.js:58:49 at C:\Users\alex\AppData\Roaming\npm\nodemodules\create-nuxt-app\cli.js:46:17

Airthee

Airthee posted a new bug report

docs •

bug fr: style issue on consecutive headings

Version

master

Reproduction link

https://fr.nuxtjs.org/guide/directory-structure#r-pertoires

Steps to reproduce

  1. Just go to the url and see the title

What is expected ?

New line after h2

What is actually happening?

h3 is on the same line as h2 :
image

MattixNow

MattixNow posted a new question

docs •

Not found typescript vuex example
techtolentino

techtolentino posted a new question

docs •

Should the price format for a theme be different?

On the Theme page, should the pricing format be updated from "99$" to "$99"?

fastory

fastory posted a new question

docs •

使用swiper组件,然而在nuxt generate 过后并没有正确编译swiper。

使用swiper组件,在开发环境中使用是正常的,然而在nuxt generate 过后并没有正确编译swiper。swiper作为一个dom元素在生成的静态文件中,

swiper 的使用参考:https://www.cnblogs.com/kobewang/p/10043867.html

florianrusch

florianrusch posted a new question

docs •

Docu about the title attribute in the head object

There is no documentation about the title attribute in the head object, or?
https://github.com/nuxt/docs/blob/master/en/api/configuration-head.md

Tenodec

Tenodec posted a new question

docs •

just a sugesstion for server-side frameworks

I suggest your team may add egg.js to the server-side frameworks while create project

jinghh

jinghh posted a new question

docs •

Where does this Axios come from please?

C29A156E-5656-4d1a-8CE1-9743F7327AE4.png


Did you forget to import it?
QQ截图20190910100550.png


or

QQ截图20190910100413.png

chriscalo

chriscalo posted a new feature request

docs •

idea Include basic example nuxt.config.js in https://nuxtjs.org/api/nuxt-render/

What problem does this feature solve?

I'm trying to get Nuxt rendering working inside of an existing express app. I followed the docs but got errors. I don't know what to put in my nuxt.config.js file. The docs should provide the most basic complete example that works, including:

  • [exists] how to integrate Nuxt into an express app
  • the simplest nuxt.config.js that works
  • a basic .vue file that works + which folder to place it in

Without these details, I'm just guessing, trying random things, and interpreting inscrutible error messages. For example, here's an error message I received, but these dependencies are installed:

 ERROR  Failed to compile with 19 errors                                                                                                   friendly-errors 10:50:21

These dependencies were not found:                                                                                                         friendly-errors 10:50:21

                                                                                                                                           friendly-errors 10:50:21
* fs in ./node_modules/@chriscalo/ejs-extra/node_modules/@chriscalo/file/index.js, ./node_modules/@chriscalo/file/index.js and 11 others   friendly-errors 10:50:21
* module in ./node_modules/@chriscalo/ejs-extra/index.js, ./node_modules/rewire/lib/moduleEnv.js                                           friendly-errors 10:50:21
* mssql/package.json in ./node_modules/knex/lib/dialects/mssql/index.js                                                                    friendly-errors 10:50:21
* net in ./node_modules/express/lib/request.js, ./node_modules/mysql/lib/Connection.js                                                     friendly-errors 10:50:21
* tls in ./node_modules/mysql/lib/Connection.js                                                                                            friendly-errors 10:50:21
                                                                                                                                           friendly-errors 10:50:21
To install them, you can run: npm install --save fs module mssql/package.json net tls                                                      friendly-errors 10:50:21

What does the proposed changes look like?

A docs page or an example repo on Github that includes the following:

  • [exists] how to integrate Nuxt into an express app
  • the simplest nuxt.config.js that works
  • a basic .vue file that works + which folder to place it in
kevinmarrec

kevinmarrec posted a new bug report

docs •

bug Missing moduleContainer statement when using Nuxt programmatically

Version

0.0.0

Reproduction link

https://nuxtjs.org/api/nuxt#using-nuxt-js-programmatically

Steps to reproduce

Related : https://github.com/nuxt/typescript/issues/92

What is expected ?

It is missing to call

nuxt.moduleContainer.ready()

to load modules from configuration.

It should be awaited to work properly :

await nuxt.moduleContainer.ready()

What is actually happening?

Missing statement, so users using Nuxt programmatically think modules are automatically handled, but it's not.

Additional comments?

As it needs the code to be asynchronous, the whole snippet need to be updated, but I'm not sure how.

93lucasp

93lucasp posted a new question

docs •

Example for Modules mode not clear

I'm trying to implement the Modules mode but in the documentation it's not clear and the code that you use is not working.
In the index you do this example:

export const state = () => ({
  counter: 0
})

export const mutations = {
  increment (state) {
    state.counter++
  }
}

and in todos this:

export const state = () => ({
  list: []
})

export const mutations = {
  add (state, text) {
    state.list.push({
      text: text,
      done: false
    })
  },
  remove (state, { todo }) {
    state.list.splice(state.list.indexOf(todo), 1)
  },
  toggle (state, todo) {
    todo.done = !todo.done
  }
}

But how to import the todos inside the index?

You say that after the output would be like that:

new Vuex.Store({
  state: () => ({
    counter: 0
  }),
  mutations: {
    increment (state) {
      state.counter++
    }
  },
  modules: {
    todos: {
      namespaced: true,
      state: () => ({
        list: []
      }),
      mutations: {
        add (state, { text }) {
          state.list.push({
            text,
            done: false
          })
        },
        remove (state, { todo }) {
          state.list.splice(state.list.indexOf(todo), 1)
        },
        toggle (state, { todo }) {
          todo.done = !todo.done
        }
      }
    }
  }
})

But where exactly is the code that will produce this output? The previus code (in the index.js and todos.js) wouldn't create this output for sure.
Some explanation please?

thrazu

thrazu posted a new question

docs •

Link to packages/vue-app/template/router.scrollBehavior.js doesn't work
thrazu

thrazu posted a new question

docs •

Link to packages/vue-app/template/router.scrollBehavior.js doesn't work
Chzfly

Chzfly posted a new feature request

docs •

idea Documentation: Add docs for using axios in async-data

What problem does this feature solve?

When i use axios from node_modules without create an instance serverRender will add the interceptors multiple. There is no description about this in docs.

FEA5T

FEA5T posted a new feature request

docs •

idea Please create documentation for components directory

What problem does this feature solve?

The documentation here https://nuxtjs.org/guide/directory-structure has detailed documentation for all directories except components.

I cannot get my project running in nuxt because I am not sure how to easily consume a component from a page.

What does the proposed changes look like?

Ideally I would like to know if components are auto registered globally, if I have to import them manually. If manual, provide an example including relative/absolute path (whatever is best practice). I would like to know what the naming conventions are, what characters are inappropriate, etc.

rtd21

rtd21 posted a new question

docs •

scroll behavior

the props scrollToTop: false don't help to stop scrolling page to top, when route is changed

Atinux

Atinux resolved the question #c198

docs •

Deploy with Now instructions no longer viable
ngaiwe

ngaiwe posted a new question

docs •

feserver 80端口代理localhost:3000 启动项目用localhost不能热更新

https://cmty.app/nuxt/issues/new?repo=docs
feserver 80端口代理localhost:3000 启动项目用localhost不能热更新

ngaiwe

ngaiwe posted a new question

docs •

feserver 80端口代理localhost:3000 启动项目用localhost不能热更新

feserver 80端口代理localhost:3000 启动项目用localhost不能热更新 ws报错500

MasterHiei

MasterHiei posted a new bug report

docs •

bug Unexpected type of Vue Router component in TypeScript

Version

[VERSION 2.8.X](https://github.com/docs/releases/tag/VERSION 2.8.X)

Reproduction link

https://nuxtjs.org/api/configuration-router#extendroutes

Steps to reproduce

Adding a custom route in nuxt.config.js like below:

export default {
  router: {
    extendRoutes (routes, resolve) {
      routes.push({
        name: 'custom',
        path: '*',
        component: resolve(__dirname, 'pages/404.vue')
      })
    }
  }
}

What is expected ?

pass without error

What is actually happening?

Get a type error.

Type 'string' is not assignable to type 'ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<string, any>> | VueConstructor<Vue> | AsyncComponentPromise<...> | AsyncComponentFactory<...> | undefined'.ts(2322)
router.d.ts(77, 3): The expected type comes from property 'component' which is declared here on type 'NuxtRouteConfig'

Additional comments?

Is it a bug of TypeScript type definitions?