【问题标题】:Next.js 11: Cannot read property 'canonicalBase' of undefinedNext.js 11:无法读取未定义的属性“canonicalBase”
【发布时间】:2021-07-13 12:06:57
【问题描述】:

从 Next.js 10.0.2 更新到 11.0.1 后出现问题 更新后我无法启动项目,因为

Cannot read property 'canonicalBase' of undefined

_app.tsx 下一个导入:

import App, { AppProps } from 'next/app';
import dynamic from 'next/dynamic';
import Head from 'next/head';
import { Router } from 'next/router';

_document.tsx 下一次导入:

import Document, { DocumentProps, Head, Html, Main, NextScript } from 'next/document';

有人遇到过同样的问题吗?

【问题讨论】:

  • 你能发布整个堆栈跟踪吗?我会尽力提供帮助。谢谢。

标签: javascript reactjs next.js


【解决方案1】:

nrwl/nx next.js v11。更新解决了这个问题。

发布说明:https://github.com/nrwl/nx/releases/tag/12.8.0

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-01-19
    • 2023-02-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-15
    • 1970-01-01
    • 2016-07-07
    相关资源
    最近更新 更多