ant*_*elm 6 node.js npm webpack next.js esbuild
我在 next.js 中使用 mdx-bundler (它使用 esbuild + node-gyp)。我已经在这个项目上工作了一段时间,一切都很顺利。现在,我的合作伙伴刚刚克隆了该存储库并尝试使其正常工作,但她得到:
../../node_modules/esbuild/lib/main.d.ts
Module parse failed: Unexpected token (1:7)
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
> export type Platform = 'browser' | 'node' | 'neutral';
| export type Format = 'iife' | 'cjs' | 'esm';
| export type Loader = 'js' | 'jsx' | 'ts' | 'tsx' | 'css' | 'json' | 'text' | 'base64' | 'file' | 'dataurl' | 'binary' | 'default';
Run Code Online (Sandbox Code Playgroud)
我不确定这可能是什么。我已经安装了所有加载程序等,并且它在我的机器上运行良好。esbuild 可能有问题吗?
我们还检查了另一台计算机上安装的全局 npm 软件包,并卸载并安装了与我完全相同的版本。
我们还尝试通过使用不同的节点版本nvm,并确保她使用完全相同的节点版本。
我不知道还能做什么,或者问题可能出在哪里?
| 归档时间: |
|
| 查看次数: |
1791 次 |
| 最近记录: |