Activities

DFASD

DFASD posted a new question

docs •

nuxt构建的项目调试问题

nuxt构建的项目在chrome的source面板搜不到对应的vue文件啊,对应的js文件也搜不到?什么情况啊!默认情况下怎么还不可见了呢?页面能够正常渲染!!!

manniL

manniL posted a new feature request

docs •

idea Disable Friendly Errors Plugin
falstack

falstack posted a new question

docs •

official docs site javascript load error

Version

v2.3.4

Reproduction link

https://nuxtjs.org/

Steps to reproduce

image

What is expected ?

because CDN?

What is actually happening?

axios module load error, page can not switch

Additional comments?

I don't know where i can report it, i can't visit https://discordapp.com/invite/HtAAAQa too, sorry close this issue, and change CDN provider, thanks

tuotuogenjudi

tuotuogenjudi posted a new question

docs •

nuxt2.0 element-ui Tree树形控件中使用 render-content 报错: Syntax Error: Unexpected token (472:13)

nuxt2.0 element-ui Tree树形控件中使用 render-content 报错: Syntax Error: Unexpected token (472:13)
Syntax Error: Unexpected token (472:13) friendly-errors 18:22:18

470 | // },
471 | renderContent (h) {

472 | return

{this.name}


| ^
473 | },

hirohirodao

hirohirodao posted a new bug report

docs •

bug Improve Tasks on Specific Hooks in Modules Guide

Version

2.2

Reproduction link

https://nuxtjs.org/guide/modules/#run-tasks-on-specific-hooks

Steps to reproduce

This is Doc's issue.
Ref: https://nuxtjs.org/guide/modules/#run-tasks-on-specific-hooks

What is expected ?

//before or done, ....
this.nuxt.hook('build:before', async builder => {})
//before or done, ....
this.nuxt.hook('generate:before', async generator => {})

What is actually happening?

this.nuxt.hook('build', async builder => {})

this.nuxt.hook('generate', async generator => {})
manniL

manniL posted a new feature request

docs •

idea Improve preprocessor section

What problem does this feature solve?

https://nuxtjs.org/faq/pre-processors#how-to-use-pre-processors-

  • Better examples
  • SASS/LESS/Stylus in the title for better accessibility
  • Better installation guide
renoirb

renoirb posted a new feature request

docs •

idea Use-case: When router.base is not default, when going to /, instead of 404, redirect to router.base as a Nuxt connect middleware example

What problem does this feature solve?

This is maybe an edge-case, and the point of nuxt.config.js' router.base is for when a Web server will serve Nuxt elsewhere than the domain root.

But when in local development, hitting localhost, when router.base is not / returns a 404.

What does the proposed changes look like?

We can use that situation to document how nuxt hooks works.

NOTE I have a functioning connect middleware, . Let's add this to the docs.

How to use example

PS: In the gist, I've added comments.

  1. Setup Nuxt config

    // file: nuxt.config.js
    import hooks from './hooks'
    export default {
      router: {
        base: '/portal',
      },
      hooks: hooks(this),
    }
    
  2. Hooks module setup

    // file: hooks/index.js
    import render from './render'
    export default (nuxtConfig) => ({
      // e.g. 'render:context'
      render: render(nuxtConfig),
    })
    
  3. Render hooks module

    // file: hooks/render.js
    import redirectRootToPortal from './route-redirect-portal'
    export default (nuxtConfig) => {
      const router = Reflect.has(nuxtConfig, 'router') ? nuxtConfig.router : {}
      const base = Reflect.has(router, 'base') ? router.base : '/portal'
      return {
        setupMiddleware(app) {
          app.use('/', redirectRootToPortal(base))
        },
      },
    }
    
  4. Middleware code

    // file: hooks/route-redirect-portal.js
    import parseurl from 'parseurl'
    export default (desiredContextRoot) => function projectHooksRouteRedirectPortal(req, res, next) {
      const desiredContextRootRegExp = new RegExp(`^${desiredContextRoot}`)
      const _parsedUrl = Reflect.has(req, '_parsedUrl') ? req._parsedUrl : null
      const url = _parsedUrl !== null ? _parsedUrl : parseurl(req)
      const startsWithDesired = desiredContextRootRegExp.test(url.pathname)
      const isNotProperContextRoot = desiredContextRoot !== url.pathname
      if (isNotProperContextRoot && startsWithDesired === false) {
        const pathname = url.pathname === null ? '' : url.pathname
        const search = url.search === null ? '' : url.search
        const Location = desiredContextRoot + pathname + search
        res.writeHead(302, {
          Location,
        })
        res.end();
      }
      next()
    }
    
manniL

manniL posted a new feature request

docs •

idea Document modern mode

What problem does this feature solve?

https://github.com/nuxt/nuxt.js/pull/4231

manniL

manniL posted a new feature request

docs •

idea Summary of context usage

What problem does this feature solve?

Page: https://nuxtjs.org/api/context#context

Summarize usage, what the context is for and where the context is available

manniL

manniL posted a new feature request

docs •

idea Migration guide for Vue apps

What problem does this feature solve?

A small guide to migrate a "basic Vue app" to Nuxt wouldn't hurt

baco16g

baco16g posted a new feature request

docs •

idea On the Japanese document, There is a misprint on the page of "LoadingIndicator property".

What problem does this feature solve?

The problem is on the following page!

https://ja.nuxtjs.org/api/configuration-loading-indicator/

1. Currently, there is a typographical error in markdown notation, and the appropriate text is not linked.

If this problem is solved, the user can access the appropriate link.

2. Currently, accessing the set link will return 404 error.

If this problem is solved, the user can access the appropriate link.

What does the proposed changes look like?

Line 48, /docs/ja/api/configuration-loading-indicator.md

before

ベースが必要な場合は、 Nuxt の組み込み[ソースコード]((https://github.com/nuxt/nuxt.js/tree/dev/lib/app/views/loading)をベースとして使用できます。

after

ベースが必要な場合は、 Nuxt の組み込み[ソースコード](https://github.com/nuxt/nuxt.js/tree/dev/packages/app/template/views/loading)をベースとして使用できます。
duffte

duffte posted a new feature request

docs •

idea Firebase Deployment Guideline (SSR)

What problem does this feature solve?

Helping people to use Google's Firebase Service with Server Rendered Apps.

What does the proposed changes look like?

There are some official Firebase Youtube videos on Nuxtjs (version 1) that are out of date and simply guide through, but do not explain the necessities.

Lukang689

Lukang689 posted a new question

docs •

How import .scss only?

I defined some scss variable in a scss file. I don't want to compile them.
By scss document, a scss file's name with the begining of "_", when the file imported, it will not be compiled.But,in nuxt.js, this method will occurr error.
What I should do?

qq510846

qq510846 posted a new question

docs •

how to use [hash] in publicPath on nuxt.config.js

I use "qiniu-webpack-plugin", and i want use [hash] to publicPath, how can i do?

If i use like:
publicPath: 'http://pflm0b2yz.bkt.clouddn.com/[hash]/'

and, i will get errors:
ERROR in chunk runtime [entry]
[chunkhash].js
Cannot use [chunkhash] or [contenthash] for chunk in '[chunkhash].js' (use [hash] instead)

manniL

manniL posted a new feature request

docs •

idea Document async nuxt.config.js

What problem does this feature solve?

https://github.com/nuxt/nuxt.js/pull/4021

manniL

manniL posted a new bug report

docs •

bug Fix source links

After the monorepo refactor source links are off. We should point them again to the right spots. Example: internals

XiaoBelly

XiaoBelly posted a new question

docs •

FATAL ERROR: CALL_AND_RETRY_LAST

FATAL ERROR: CALLANDRETRY_LAST Allocation failed - JavaScript heap out of memory

<--- Last few GCs --->

[88965:0x102800600] 56404 ms: Mark-sweep 1266.8 (1553.2) -> 1266.2 (1508.2) MB, 364.3 / 0.0 ms allocation failure GC in old space requested
[88965:0x102800600] 56657 ms: Mark-sweep 1266.2 (1508.2) -> 1266.2 (1455.2) MB, 251.7 / 0.0 ms last resort GC in old space requested
[88965:0x102800600] 56908 ms: Mark-sweep 1266.2 (1455.2) -> 1266.2 (1441.7) MB, 250.8 / 0.0 ms last resort GC in old space requested

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x996fca5879 <JSObject>
1: fromString(aka fromString) [buffer.js:314] [bytecode=0x997ab75af9 offset=164](this=0x9924a822d1 <undefined>,string=0x997c8abce1 <Very long string[93620486]>,encoding=0x996fcb58e9 <String[4]: utf8>)
2: from [buffer.js:177] [bytecode=0x997ab75601 offset=11](this=0x99eae364f1 <JSFunction Buffer (sfi = 0x996fcfc461)>,value=0x997c8abce1 <Very long string[93620486]>,encodingOrOffset=0x996fcb5…

FATAL ERROR: CALLANDRETRYLAST Allocation failed - JavaScript heap out of memory 1: node::Abort() [/usr/local/bin/node] 2: node::FatalException(v8::Isolate, v8::Local<v8::Value>, v8::Local<v8::Message>) [/usr/local/bin/node] 3: v8::internal::V8::FatalProcessOutOfMemory(char const, bool) [/usr/local/bin/node]
4: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/usr/local/bin/node]
5: v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [/usr/local/bin/node]
6: v8::String::WriteUtf8(char, int, int, int) const [/usr/local/bin/node]
7: node::StringBytes::Write(v8::Isolate, char, unsigned long, v8::Local<v8::Value>, node::encoding, int) [/usr/local/bin/node] 8: node::Buffer::New(v8::Isolate, v8::Local<v8::String>, node::encoding) [/usr/local/bin/node]
9: node::Buffer::(anonymous namespace)::CreateFromString(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
10: v8::internal::FunctionCallbackArguments::Call(void ()(v8::FunctionCallbackInfo<v8::Value> const&)) [/usr/local/bin/node] 11: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/usr/local/bin/node]
12: v8::internal::Builtin
Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
13: 0x234a81042fd
Abort trap: 6

XiaoBelly

XiaoBelly posted a new question

docs •

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

<--- Last few GCs --->
[88965:0x102800600] 56404 ms: Mark-sweep 1266.8 (1553.2) -> 1266.2 (1508.2) MB, 364.3 / 0.0 ms allocation failure GC in old space requested
[88965:0x102800600] 56657 ms: Mark-sweep 1266.2 (1508.2) -> 1266.2 (1455.2) MB, 251.7 / 0.0 ms last resort GC in old space requested
[88965:0x102800600] 56908 ms: Mark-sweep 1266.2 (1455.2) -> 1266.2 (1441.7) MB, 250.8 / 0.0 ms last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x996fca5879 <JSObject>
1: fromString(aka fromString) [buffer.js:314] [bytecode=0x997ab75af9 offset=164](this=0x9924a822d1 <undefined>,string=0x997c8abce1 <Very long string[93620486]>,encoding=0x996fcb58e9 <String[4]: utf8>)
2: from [buffer.js:177] [bytecode=0x997ab75601 offset=11](this=0x99eae364f1 <JSFunction Buffer (sfi = 0x996fcfc461)>,value=0x997c8abce1 <Very long string[93620486]>,encodingOrOffset=0x996fcb5…
FATAL ERROR: CALLANDRETRYLAST Allocation failed - JavaScript heap out of memory 1: node::Abort() [/usr/local/bin/node] 2: node::FatalException(v8::Isolate, v8::Local<v8::Value>, v8::Local<v8::Message>) [/usr/local/bin/node] 3: v8::internal::V8::FatalProcessOutOfMemory(char const, bool) [/usr/local/bin/node]
4: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/usr/local/bin/node]
5: v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [/usr/local/bin/node]
6: v8::String::WriteUtf8(char, int, int, int) const [/usr/local/bin/node]
7: node::StringBytes::Write(v8::Isolate, char, unsigned long, v8::Local<v8::Value>, node::encoding, int) [/usr/local/bin/node] 8: node::Buffer::New(v8::Isolate, v8::Local<v8::String>, node::encoding) [/usr/local/bin/node]
9: node::Buffer::(anonymous namespace)::CreateFromString(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
10: v8::internal::FunctionCallbackArguments::Call(void ()(v8::FunctionCallbackInfo<v8::Value> const&)) [/usr/local/bin/node] 11: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/usr/local/bin/node]
12: v8::internal::Builtin
Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
13: 0x234a81042fd
Abort trap: 6

antony

antony posted a new question

docs •

Where are older docs?

I've just visited the Nuxt site to find that the docs are now for version 2.x - last time i checked they were 1.x!

We've not quite moved to v2.x yet, so how can I get docs for my existing application?

manniL

manniL posted a new feature request

docs •

idea Custom directory names

What problem does this feature solve?

https://github.com/nuxt/nuxt.js/pull/2748 is not documented!