部署到 AWS 时,我遇到了纱线错误
error fs-extra@7.0.1: The engine "node" is incompatible with this module. Expected version ">=6 <7 || >=8". Got "7.0.0"
Run Code Online (Sandbox Code Playgroud)
知道这将如何解决吗?
如果我在 package.json 中指定引擎,这会解决吗
{
"engines" : {
"node" : ">=8.0.0"
}
}
Run Code Online (Sandbox Code Playgroud) 当我在其参数中传递sql连接时,JasperFillManager抛出一个空指针异常,但是当我传递JRResultSetDatasource时它运行正常.
java.lang.NullPointerException
at java.lang.Class.isAssignableFrom(Native Method)
at net.sf.jasperreports.engine.fill.JRFillTextField.getFormat(JRFillTextField.java:706)
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:394)
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:368)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:258)
at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:499)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2036)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:760)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:270)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:946)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:845)
at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:609)
at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59)
at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:205)
at java.lang.Thread.run(Unknown Source)
Run Code Online (Sandbox Code Playgroud)
当我在fillReport中传递连接时,它会给出异常.
jasperPrint = JasperFillManager.fillReport(jasperReport, map, reportConnection);
Run Code Online (Sandbox Code Playgroud)
我也在使用子报表,这就是为什么我没有使用JRResultSetDatasource并使用连接.我只是坚持这个说明,当我传递JRResultSetDatasource它工作正常,当我也在HasMap参数中传递连接对象时,它给出与上面相同的错误.
我正在将图像从jpg转换为png,但它正在给出错误.下面是代码和错误.
gm('E:/image1.jpg').write('E:/image2.png', function(err){
if (err){
console.log(err);
} else{console.log('image converted.')}
})
Run Code Online (Sandbox Code Playgroud)
错误是:
[Error: Could not execute GraphicsMagick/ImageMagick: gm "convert" "E:/image1.jpg" "E:/image2.png" this most likely means the gm/convert binaries can't be found]
Run Code Online (Sandbox Code Playgroud)
我需要npm graphicsmagick和imagemagick吗?
我收到错误,Module '"typeorm"' has no exported member 'DataSource'.
而.Module '"typeorm"' has no exported member 'DataSourceOptions'.
nest build
npm install 之后,我使用nest build
命令行命令构建了 Nestjs 应用程序,但出现了这些错误。
typeorm版本是“^0.2.25”,“@nestjs/typeorm”:“^8.0.2”,
无法弄清楚为什么会发生这种情况。
tsconfig.json
{
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"target": "es2019",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./src",
"incremental": true,
"typeRoots": ["types", "node_modules/@types"],
"strict": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"useUnknownInCatchVariables": false
},
"exclude": ["node_modules", "scripts", "dist"]
}
Run Code Online (Sandbox Code Playgroud)
ormconfig.ts
const DATABASE_TYPE = process.env.DATABASE_TYPE || 'postgres';
const DATABASE_URL …
Run Code Online (Sandbox Code Playgroud) 我需要更新 apache 2.2.22 以支持 TLSv1.2。我已经尝试了下面的命令,但它不起作用
SSLProtocol +TLSv1.2 +TLSv1.1 +TLSv1
Run Code Online (Sandbox Code Playgroud)
但是当我放置这个命令时,它会在 Windows 事件查看器中显示一个错误
SSLProtocol: Illegal protocol 'TLSv1.2'
Run Code Online (Sandbox Code Playgroud) 我只想在单击按钮时显示日期选择器
<input type="button" id=day value="day" />
$("#day").datepicker();
Run Code Online (Sandbox Code Playgroud)
上面的行用所选日期填充按钮文本
我也尝试过下面的代码,但是什么也没有发生
$("#day").click(function() {
$("#hiddenField").datepicker('show');
});
Run Code Online (Sandbox Code Playgroud) 我正在对div进行排序,但无法执行排序.我正在使用jQuery.fn.sortElements.下面是html.
<div id="sortList">
<div class="list" style="display: block;">
<a onclick="openInfoWindow("10"); return false;" href="#"></a>
<div class="imgClass">
<a onclick="openInfoWindow("10"); return false;" href="#">
<img class="innerImg" alt="" src="img">
</a>
</div>
<div class="inner">
<div class="name">edata</div>
</div>
</div>
<div class="list" style="display: block;">
<a onclick="openInfoWindow("10"); return false;" href="#"></a>
<div class="imgClass">
<a onclick="openInfoWindow("10"); return false;" href="#">
<img class="innerImg" alt="" src="img">
</a>
</div>
<div class="inner">
<div class="name">fdata</div>
</div>
</div>
<div class="list" style="display: block;">
<a onclick="openInfoWindow("10"); return false;" href="#"></a>
<div class="imgClass">
<a onclick="openInfoWindow("10"); return false;" href="#">
<img class="innerImg" alt="" src="img">
</a> …
Run Code Online (Sandbox Code Playgroud) 我正在从 json 对象访问一个键,但它返回未定义
{"body":"Hi","date":"2016-07-29 07:43:00"}
var a = JSON.parse(JSON.stringify(r.txt));
console.log(a.body)
//undefined
Run Code Online (Sandbox Code Playgroud)
r 的值是
{
username: '1',
txt: '{"body":"Hi","date":"2016-07-29 07:43:00"}',
}
Run Code Online (Sandbox Code Playgroud)
我曾尝试使用 stringify 然后解析为 json 但仍然返回未定义。
我正在尝试使用 cloudformation 模板为 API 网关创建一个具有 GET 方法的资源 /user/devices 但它给了我一个以下错误
发生错误:ApiGatewayRootMethod - 为 URI 指定的 HTTP 端点无效(服务:AmazonApiGateway;状态代码:400;错误代码:BadRequestException;请求 ID:xxxxxxxxxx)
下面是我的cloudformation模板,
AWSTemplateFormatVersion: 2018-11-13
Description: test user
resources:
Resources:
UserDeviceApiGateway:
Type: "AWS::ApiGateway::RestApi"
Properties:
Name: "test-user-info"
Description: "Fetch the user"
UserResource:
Type: 'AWS::ApiGateway::Resource'
Properties:
ParentId:
Fn::GetAtt: ["UserDeviceApiGateway","RootResourceId"]
RestApiId:
Ref: "UserDeviceApiGateway"
PathPart: 'user'
Resource:
Type: 'AWS::ApiGateway::Resource'
Properties:
ParentId:
Ref: "UserResource"
RestApiId:
Ref: "UserDeviceApiGateway"
PathPart: 'devices'
ApiGatewayRootMethod:
Type: "AWS::ApiGateway::Method"
Properties:
AuthorizationType: "NONE"
HttpMethod: "GET"
Integration:
IntegrationHttpMethod: "GET"
Type: "HTTP"
Uri: Sub
- "arn:aws:apigateway:arn:aws:lambda:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:xxxxxxxx:function:user-device-lambda/invocations"
ResourceId:
Fn::GetAtt: ["UserDeviceApiGateway","RootResourceId"]
RestApiId: …
Run Code Online (Sandbox Code Playgroud) amazon-web-services node.js aws-api-gateway serverless-framework aws-serverless
我正在尝试使用命令从 docker 文件安装依赖项RUN npm ci
。但我收到以下错误Conflicting peer dependencies. Fix the upstream dependency conflict, or retry this command with --force, or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution.
。在我的本地项目中,我在运行时克服了这个问题npm install --force
。在构建和运行此命令时,如何在 Docker 内部修复此问题RUN npm ci
。
据我了解,npm ci 会从 package-lock.json 或 npm-shrinkwrap.json 中查找。但仍然面临这个问题。无法弄清楚是什么原因造成的。
node.js ×5
javascript ×3
npm ×3
jquery ×2
apache ×1
dependencies ×1
docker ×1
imagemagick ×1
java ×1
jquery-ui ×1
json ×1
nestjs ×1
npm-ci ×1
npm-install ×1
openssl ×1
ssl ×1
tls1.2 ×1
typeorm ×1
yarnpkg ×1