webpack - 新的“npx create-next-app”应用程序无法编译
问题描述
我想通过运行创建下一个应用程序npx create-next-app hulu
跑步时yarn run dev
我明白了
Error: Cannot find module 'C:\Users\Tawfik\dev\learning\frontend\hulu\.next\server\pages-manifest.json'
和
error - ../../../../Desktop/dev/learning/frontend/hulu/pages/_app.js
Module parse failed: Unexpected token (4:9)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| function MyApp({ Component, pageProps }) {
> return <Component {...pageProps} />
| }
|
在调查了一些答案后,我知道这是由于版本控制,我需要降级 webpack 或 npm 才能使其正常运行,但 nextjs 是一个成熟的环境,他们没有说明运行应用程序所需的任何降级。
工具坏了create-next-app
还是有其他解释?
解决方案
推荐阅读
- android - Android 应用程序是否应该在发送数据之前检查 Wear 是否已连接?
- javascript - Javascript - 从 API 检索 JSON 数据以在其他 Javascript 函数中使用
- c# - 注册、解决、发布模式的使用
- django - 从 windows linux 子系统无法连接 windows 10 psql
- neural-network - 设置神经网络:外部 GPU 还是内部 GPU?
- python - 将二维数组的前 3 个元素插入 MySql 数据库
- c# - 使用 RegEx 将字符串转换为 Pascal 大小写
- sql - 根据前一行内的计算值创建计算值
- python - 如何使用 PySpark 将数据流式传输到 MySQL 数据库?
- android - react-native-sound 不适用于 iOS 的生产版本,但适用于模拟器和生产 android