草庐IT

require_parentheses

全部标签

【解决ESlint的bug】return old(m, filename); Error [ERR_REQUIRE_ESM]: require() of ES Module

在使用eslint配置时,提交出现bug:C:\Users\USER\AppData\Roaming\npm\node_modules\ts-node\dist\index.js:729returnold(m,filename);^Error[ERR_REQUIRE_ESM]:require()ofESModuleC:\Users\USER\Desktop\tindin\node_modules\node-fetch\src\index.jsfromC:\Users\USER\Desktop\tindin\src\api\services\unsplash.tsnotsupported.Ins

python项目安装依赖包提示需要升级error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C

【错误背景】今天在本地windows10环境下运行一个老的python项目(3年前),依赖包都是老的,所以当你使用pipinstallrequirements.txt安装所需的依赖包时从网络下载的有可能是新的依赖包,会导致项目中各种报错,这些错误可能并非代码书写有问题,很大的原因是由于依赖包版本不一致造成,这时,我通过使用本地的依赖包本地安装的方式如下:进入C:\python\venv\Lib\site-packages\psutil-5.6.2\psutil-5.6.2```pythonpythonsetup.pyinstall(python加载本地依赖包的方式)```此时控制台报错:```

Python安装包报错ERROR: Could not find a version that satisfies the requirement XXX解决方法

我们在使用pip安装python包时,经常会出现如下错误:ERROR:Couldnotfindaversionthatsatisfiestherequirementxxxx(fromversions:none)ERROR:Nomatchingdistributionfoundforxxxx找了很久终于找到能解决这种报错的方法了。直接选用pip源并且信任它的来源就可以解决这种问题。pipinstall库包名-ihttp://pypi.douban.com/simple/--trusted-hostpypi.douban.com上面使用了豆瓣源,将其换成清华源、阿里源等都适用。清华源:Simple

解决报错Parameter 0 of constructor in XXX required a bean...elasticsearch 继承ElasticsearchConfiguration方法

SpringBoot中构建带有含参构造函数的Bean,解决报错Parameter0ofconstructorinXXXrequiredabean,elasticsearch继承AbstractElasticsearchConfiguration方法…报错内容Description:Parameter0ofconstructorinxxx...CommonElasticsearchRepositoryrequiredabeanoftype'org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate'thatcould

Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\hp\AppData\Roaming\npm\node_modules\nrm\nod

在学习node.js时安装全局工具nrm工具,尝试使用nrmls命令查看可使用服务器,发现报错Error[ERR_REQUIRE_ESM]:require()ofESModule C:\Users\hp\AppData\Roaming\npm\node_modules\nrm\cli.jstoadynamicimport()whichisavailableinallCommonJSmodules.  atObject.(C:\Users\hp\AppData\Roaming\npm\node_modules\nrm\cli.js:9:14){ code:'ERR_REQUIRE_ESM'},使

(解决方案) node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28‘ not found (node required by node)

您可能会遇到安装在ubuntu操作系统上的NodeJS问题,当您运行 node-v或pm2list 命令时出现错误:-  node:/lib/x86_64-linux-gnu/libc.so.6:version`GLIBC_2.28'notfound(requiredbynode)。GLIBC_2.28notfound的解决方法(节点需要)我尝试了各种解决方案堆栈溢出,最后一个解决方案对我有用,只需通过以下命令运行即可。sudoapt-getremovenodejsnvmi16sudoapt-getinstallnodejssudoapt-getinstallnpmnode-vnpm-vnvm

pip install opencv-python出错 Getting requirements to build wheel ... error (conda 环境)

目的:使用python2,安装cv2module出现问题。最近训练神经网络的代码,遇到使用python2的源码,自己改成python3的时候发现问题。还是改到python2。但是还遇到问题。特别是安装cv2模块的时候:对于这类问题,最后发现是,在使用pipinstallopencv-python的时候,默认安装较新的版本。它和python2的环境兼容。因此出现上述问题。需要将其降级,安装较低版本的opencv首先升级安装pip:python-mpipinstall--upgradepip结果如下:然后直接安装4.1.1.26版本,它能兼容python2pipinstallopencv-pyth

OFFICE安装报错:This installation requires a compatible Microsoft Office program installed on your comput

OFFICE安装报错:ThisinstallationrequiresacompatibleMicrosoftOfficeprograminstalledonyourcomputer.正文后记正文这个错误表示需要在计算机上安装兼容的MicrosoftOffice程序。据网页上说可能是电脑里原来没有卸载干净的版本和已安装的版本不适配,但我的问题不在这里,而是下面的红色√没有勾选。记得勾选上zh-CN试一试,千万别疏忽了。后记有时候office没有卸载干净也会报一些错误,下面推荐两个常用的卸载清理工具。官网工具https://outlookdiagnostics.azureedge.net/sar

./configure: error: the HTTP rewrite module requires the PCRE library.

./configure:error:theHTTPrewritemodulerequiresthePCRElibrary.这个错误提示告诉你,在运行configure脚本时遇到了问题,原因是HTTPrewrite模块需要PCRE库的支持。PCRE(PerlCompatibleRegularExpressions)是一种用来处理正则表达式的库,它主要用于文本搜索和替换。要解决这个问题,你需要安装PCRE库。不同的系统会有不同的方法来安装PCRE库,你可以尝试搜索相关教程或者在线查询。例如,在Linux系统上,你可以使用包管理器来安装PCRE库,例如:sudoapt-getinstalllibpc

Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\hp\AppData\Roaming\npm\node_modules\nrm\nod

在学习node.js时安装全局工具nrm工具,尝试使用nrmls命令查看可使用服务器,发现报错Error[ERR_REQUIRE_ESM]:require()ofESModule C:\Users\hp\AppData\Roaming\npm\node_modules\nrm\cli.jstoadynamicimport()whichisavailableinallCommonJSmodules.  atObject.(C:\Users\hp\AppData\Roaming\npm\node_modules\nrm\cli.js:9:14){ code:'ERR_REQUIRE_ESM'}通过