我制作了一个npm包,它由一堆React Components组成。我使用webpack 4进行了构建,但是当我将其安装在其他项目中并导入时,会出现错误“未定义窗口”。
在捆绑软件中,失败的代码行是
[root@ONEVPS190105040754 ~]# youtube-dl -V
Traceback (most recent call last):
File "/usr/local/python3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/python3/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/bin/youtube-dl/__main__.py", line 16, in <module>
File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 15, in <module>
File "/usr/local/bin/youtube-dl/youtube_dl/options.py", line 8, in <module>
File "/usr/local/bin/youtube-dl/youtube_dl/downloader/__init__.py", line 3, in <module>
File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 9, in <module>
File "/usr/local/bin/youtube-dl/youtube_dl/compat.py", line 7, in <module>
File "/usr/local/python3/lib/python3.7/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
[root@ONEVPS190105040754 ~]# yum install libffi-dev
Loaded plugins: changelog, fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.metrocast.net
* extras: mirrors.maine.edu
* updates: mirrors.advancedhosters.com
No package libffi-dev available.
Error: Nothing to do
如何解决该问题?寻求您需要我提供的任何信息,以查找问题所在。
谢谢。
答案 0 :(得分:1)
您要在哪个环境中执行此操作?