Npm `在postinstall脚本中运行“下一个生成”后需要相应的加载程序“错误”

Npm `在postinstall脚本中运行“下一个生成”后需要相应的加载程序“错误”,npm,next.js,post-install,Npm,Next.js,Post Install,以下是复制回购协议: 只需运行: npm i -g git+ssh://git@github.com:stomvi/nextjs-postinstall-build.git 我将next.js用作本地web服务器,作为cli工具的一部分。我想在工具安装后构建next.js服务器,因此我将next build放在postinstall脚本的package.json中。安装失败,出现“您可能需要适当的加载程序来处理此文件类型,当前未配置加载程序来处理此文件。”错误 使用 -next.js v9.

以下是复制回购协议:

只需运行:

npm i -g git+ssh://git@github.com:stomvi/nextjs-postinstall-build.git
我将next.js用作本地web服务器,作为cli工具的一部分。我想在工具安装后构建next.js服务器,因此我将
next build
放在
postinstall
脚本的
package.json
中。安装失败,出现“您可能需要适当的加载程序来处理此文件类型,当前未配置加载程序来处理此文件。”错误

使用 -next.js v9.0.4 -npm 6.9.0

该错误显示可能没有用于此的
jsx
文件加载程序。本地
npm链接
工作正常

Failed to compile.

./pages/logs/[page].js 11:4
Module parse failed: Unexpected token (11:4)
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
|
|   return (
>     <Layout>
|       <div className="card filter-container">
|         <div className="card-header">

> Build error occurred
Error: > Build failed because of webpack errors
未能编译。
./pages/logs/[page].js 11:4
模块分析失败:意外令牌(11:4)
您可能需要适当的加载程序来处理此文件类型,目前没有配置加载程序来处理此文件。看见https://webpack.js.org/concepts#loaders
|
|返回(
>     
|       
|         
>发生生成错误
错误:>由于网页包错误,生成失败
我怎样才能做到这一点呢?目前我只是将
.next
目录提交到repo中