我尝试构建我的next.js应用程序,遇到了这个错误,它破坏了我的应用程序。 找不到模块:错误:无法解析'/app/node_modules/next/dist/lib‘中的'pnpapi’ > Build error occurred
Error: > Build failed because of webpack errors
at build (/app/node_modules/next/dist/build/index.js:15:918)
at process._tickCallback (internal/process/next_tic
我有创建-反应-项目v15和运行npm运行构建,并花费了很长时间(20分钟)(像冻结)运行构建,然后得到这个错误的结果。
怎么解决这个问题?
enter code heresers/rice/my-app-2/node_modules/extract-text-webpack-plugin/dist/index.js:246
if (extractedChunk.getNumberOfModules()) {
^
TypeError: extractedChunk.getNumberOfModules is nota fu
当我试图构建我的nextjs应用程序时,我会遇到这个错误。这个错误没有发生在我的应用程序的最后一个版本上,我没有使用任何配置文件,只是添加了几个动画库,当然,除了我编写的代码之外。
回购链接:添加-内部待办事项分支
yarn run v1.22.19
$ next build
info - Linting and checking validity of types
info - Creating an optimized production build
Failed to compile.
HookWebpackError: Cannot set properties of undefi
我有一个与几乎相同的问题。创建user模型时,将返回以下错误:
ReferenceError: g is not defined
at new ModelConstructor (eval at createModelClassCtor (/usr/src/app/node_modules/loopback-datasource-juggler/lib/model-builder.js:671:21), <anonymous>:10:27)
at user.ModelBaseClass._initProperties (/usr/src/app/node_modul
为了利用Next.js,我将一个项目从Heroku迁移到Vercel。这不是我第一次使用Next,但我以前从未遇到过这样的bug。
昨晚我成功地构建了它,它运行得很好,但是在这段过程中,我得到了这样的错误消息:
HookWebpackError: Unexpected '/'. Escaping special characters with \ may help.
at makeWebpackError (/opt/homebrew/lib/node_modules/next/dist/compiled/webpack/bundle5.js:41630:9)
当我使用命令设置jspm安装时:
jspm init
然后它只要求我提供初始配置:
Would you like jspm to prefix the jspm package.json properties under jspm? [yes]:yes
Enter server baseURL (public folder path) [./]:app
Enter jspm packages folder [app/jspm_packages]:
Enter config file path [app/config.js]:
Configuration file app/config.js
我一直在搜索Next.js,目前的javascript框架,我想开始练习。问题是:它根本不在我的电脑里运行。
创建下一个项目的自然形式是使用命令行:
npx create-next-app
或
yarn create next-app
结果是一个具有文件结构和几个运行服务器脚本的模板项目。最基本的脚本在开发模式下运行服务器:
npm run dev
或
yarn dev
终端机的结果是发出警告:
$ yarn dev
yarn run v1.22.5
$ next dev
(node:5348) [DEP0148] DeprecationWarning: Use of deprecated f
我正在建立sequelize-typescript,然后添加模型:
import appRoot from 'app-root-path'
connection = new Sequelize({... connection details})
const appGlobPattern = join(appRoot.toString(), 'src/**/entities/*.entity.ts')
// appGlobPattern = absolute path to the root of the project (i.e
我目前正在使用来自Remix的独立堆栈,但是试图用柏树运行测试会给我发送在柏树浏览器中的错误,有人有类似的问题吗?我从零开始使用独立堆栈
这是完全的错误。
Error: Webpack Compilation Error
./node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js 429:27
Module parse failed: Unexpected token (429:27)
You may need an appropriate loader to handle this file type, curr
我正在构建一个渐进式的angular应用程序,它使用angular通用的服务器端渲染。我遇到了让SSR工作的问题。此应用程序连接到postgres,并在后端使用express/node。确切的问题是在运行服务器时,我无法加载应用程序。我收到一个错误,说它找不到索引文件,但我在dist文件夹中看到了索引文件,它声称找不到。
我得到的错误
Error: Failed to lookup view "index" in views directory "./dist"
at Function.render (/Users/jonathancorrin/Desk
我使用MongoDB地图集托管数据库,并使用以下功能查询数据:
import { NextApiRequest, NextApiResponse } from "next";
// models
import { Section } from "../../../models/Section";
// db connection
import { useDatabase } from "../../../middleware/useDatabase";
async function find(req: NextApiRequest, res