首页 > 解决方案 > 新的“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还是有其他解释?

标签: webpacknext.js

解决方案


推荐阅读