我的pdfjs-dist
react 应用程序中有依赖项,但它不起作用 - 我不确定我更改了什么导致了这种情况。我跑node v14.16.1
,npm v7.9.0
,react 17.0.2
,react-scripts 4.0.3
,和pdfjs-dist 2.7.570
。我在运行时收到以下错误消息npm start
:
Failed to compile.
./node_modules/pdfjs-dist/build/pdf.js 2407:53
Module parse failed: Unexpected token (2407:53)
File was processed with these loaders:
* ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| intent: renderingIntent,
| renderInteractiveForms: renderInteractiveForms === true,
> annotationStorage: annotationStorage?.getAll() || null
| });
| }
Run Code Online (Sandbox Code Playgroud)
我已经尝试卸载并重新安装相关软件包,以及npm update
、npm audit
等等。我也尝试添加 …