错误:找不到模块:错误:CAS可以分辨' signature_pad'过去三周一直在工作
删除node_modules并进行新的NPM安装后,我现在会遇到此错误
$ ng build
Your global Angular CLI version (14.1.0-next.0) is greater than your local version (13.3.7). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
- Generating browser application bundles (phase: setup)...
Another process, with id 2112, is currently running ngcc.
Waiting up to 250s for it to finish.
(If you are sure no ngcc process is running then you should delete the lock-file at C:/ClientApp/node_modules/.ngcc_lock_file.)
√ Browser application bundle generation complete.
√ Browser application bundle generation complete.
./node_modules/angular2-signaturepad/fesm2015/angular2-signaturepad.mjs:3:0-52 - Error: Module not found: Error: Can't resolve 'signature_pad' in 'C:\ClientApp\node_modules\angular2-signaturepad\fesm2015'
。我正在使用Angular 13.3.0,这很棒。
I'm getting this error now after deleting node_modules and doing a fresh npm install
$ ng build
Your global Angular CLI version (14.1.0-next.0) is greater than your local version (13.3.7). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
- Generating browser application bundles (phase: setup)...
Another process, with id 2112, is currently running ngcc.
Waiting up to 250s for it to finish.
(If you are sure no ngcc process is running then you should delete the lock-file at C:/ClientApp/node_modules/.ngcc_lock_file.)
√ Browser application bundle generation complete.
√ Browser application bundle generation complete.
./node_modules/angular2-signaturepad/fesm2015/angular2-signaturepad.mjs:3:0-52 - Error: Module not found: Error: Can't resolve 'signature_pad' in 'C:\ClientApp\node_modules\angular2-signaturepad\fesm2015'
I'm at a loss. I'm using Angular 13.3.0 and this was working great.
I need to get this fixed. I have scoured the internet for this problem but even though the file is there in node_modules, it can't find it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能使用了“ NPM I - Legacy-Peer-Deps”来安装您的软件包,这些软件包跳过了对等依赖性“ signature_pad”,这就是为什么找不到它。
据我所知,您有2个选项:
使用“ npm i -force”
手动在您的软件包中包含丢失的软件包。JSON依赖项并使用“ npm i -legacy-peer-deps”
。
<传统peer-deps`
You probably used "npm i --legacy-peer-deps" to install your packages, which skipped the peer-dependency "signature_pad", and that's why it can't find it.
As far as I know, you have 2 options:
Use "npm i --force"
Manually include the missing package in your package.json dependencies and use "npm i --legacy-peer-deps"
To read more about --legacy-peer-deps and --force and their differences:
npm: When to use `--force` and `--legacy-peer-deps`