这是我的logger.ts文件,那里发生错误:
import logger from "pino";
import dayjs from "dayjs";
const log = logger({
prettyPrint: true,
base: {
pid: false,
},
timestamp: () => `,"time":"${dayjs().format()}"`,
});
export default log;
Run Code Online (Sandbox Code Playgroud)
错误:
yarn dev
yarn run v1.22.17
warning package.json: License should be a valid SPDX license expression
warning ..\..\..\..\package.json: No license field
$ ts-node-dev --respawn --transpile-only src/app.ts
[INFO] 19:09:45 ts-node-dev ver. 1.1.8 (using ts-node ver. 9.1.1, typescript ver. 4.6.3)
TypeError: (0 , dayjs_1.default) is not a function
at timestamp (C:\Users\A\Desktop\desktop\base_code\back_bc_node\src\utils\logger.ts:9:37)
at …Run Code Online (Sandbox Code Playgroud) 我刚刚将我的Android工作室从2.3升级到3.0.1.但我收到此错误消息(我已经安装了API 27)并且不知道如何修复它,因为我在新版本的android studio中找不到构建工具版本!
Error:Failed to find Build Tools revision 26.0.2 <a href="install.build.tools">Install Build Tools 26.0.2 and sync project</a>
Run Code Online (Sandbox Code Playgroud)
gradle文件已更改,项目结构也只有一个选项卡!
编辑:这是`app/build.gradle的内容:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.m.finalocr"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
Run Code Online (Sandbox Code Playgroud)
如你所见,其中没有buildToolsVersion.那么,当我的计算机上安装了27版本时,为什么我的android工作室会查找这个特定版本(26)?另外,我在哪里可以看到buildToolsVersion "26.0.2" and change it …
我正在按照本教程安装TensorFlow(https://www.tensorflow.org/install/pip),但是在最后一个命令中:
python -c "import tensorflow as tf; tf.enable_eager_execution(); print(tf.reduce_sum(tf.random_normal([1000, 1000])))"
Run Code Online (Sandbox Code Playgroud)
我得到这个结果:
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
ImportError: numpy.core.multiarray failed to import
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 980, in _find_and_load
SystemError: <class '_frozen_importlib._ModuleLockManager'> returned a result with an error set
ImportError: numpy.core._multiarray_umath failed to import
ImportError: numpy.core.umath failed to import
2019-02-16 12:56:50.178364: F tensorflow/python/lib/core/bfloat16.cc:675] Check failed: PyBfloat16_Type.tp_base != nullptr
Run Code Online (Sandbox Code Playgroud)
numpy如您所见,我已经安装了:
pip3 install numpy …Run Code Online (Sandbox Code Playgroud) 我只是一个新学习者,按照视频教程,我的代码如下所示:
import { Injectable } from '@angular/core';
import { Dish } from '../shared/dish';
import { DishService } from '../services/dish.service';
import { Observable } from 'rxjs';
import {map} from 'rxjs/operators';
import { CouchbaseService } from '../services/couchbase.service';
import * as LocalNotifications from 'nativescript-local-notifications';
@Injectable()
export class FavoriteService {
favorites: Array<number>;
docId: string = "favorites";
constructor(private dishservice: DishService,
private couchbaseService: CouchbaseService) {
this.favorites = [];
let doc = this.couchbaseService.getDocument(this.docId);
if( doc == null) {
this.couchbaseService.createDocument({"favorites": []}, this.docId);
}
else {
this.favorites = doc.favorites; …Run Code Online (Sandbox Code Playgroud) 我正在尝试创建一个新的 Web 项目并想使用技术分析图表库,但是当我想下载它时,它要求提供一个我没有的公共网站域!这是一个教育项目,我没有公司或为其创建网站。有没有可以下载图书馆的地方?
我已经下载了该cmake-3.11.3-Linux-x86_64.sh文件。然后我执行它并创建了一个文件夹,其中有一个bin文件cmake。我尝试/etc/environment像这样编辑:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/m/FILES/CMake/cmake-3.11.3-Linux-x86_64/bin"
Run Code Online (Sandbox Code Playgroud)
但是当我尝试这个命令时:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
Run Code Online (Sandbox Code Playgroud)
我收到这条消息:
当前未安装程序“cmake”。您可以通过键入以下命令来安装它: sudo apt install cmake
我所做的哪一部分是错误的,我该如何解决?
我正在学习使用此命令安装 popper: 的教程
npm install popper --save。但是当我尝试它时收到此错误消息:致命错误 - 检测到 cygheap base mismatch - 0x13A1410/0x13D1410
所以我搜索找到这个库的github页面并找到了这个页面:https : //github.com/FezVrasta/popper.js但我看到它建议使用这个命令来安装它:npm install popper.js --save它与我的教程不同。现在我想知道这些对图书馆有什么不同吗?如果它们不同,那么poppenot的 github 页面popper.js是什么?
我还必须提到,我没有说 python popper 库。我想要 .js 使用的 javascript 版本bootstrap4。
我刚刚安装,Android.Studio.3.4.1.0.x64但是当我想打开它时,出现此错误:
应用程序无法正确启动 (0xc000007b)。单击确定关闭应用程序。
为什么会发生这种情况,我该如何解决?
我搜索了错误并做了这些事情,但没有奏效:
重新安装了 AndroidStudio
安装 dot net framework 4.7.2 开发包
安装最新版本的 DirextX
每次执行上述步骤都重新启动计算机
我可以在 VisualStudio 代码中打开 Angular、NativeScript 或 NodeJS 项目,方法是转到其目录并只需键入code .命令行。所以我很想知道是否还有另一个命令,例如在而不是code .打开项目中?VisualStudio 2019Visual Studio code
这是我的app.ts文件:
import express, { Request, Response } from "express";
import dotenv from "dotenv";
dotenv.config();
import config from "config";
import responseTime from "response-time";
import connect from "./utils/connect";
import logger from "./utils/logger";
import routes from "./routes";
import deserializeUser from "./middleware/deserializeUser";
import { restResponseTimeHistogram, startMetricsServer } from "./utils/metrics";
import swaggerDocs from "./utils/swagger";
const port = config.get<number>("port");
const app = express();
app.use(express.json());
app.use(deserializeUser);
app.use(
responseTime((req: Request, res: Response, time: number) => {
if (req?.route?.path) {
restResponseTimeHistogram.observe(
{
method: req.method,
route: req.route.path,
status_code: …Run Code Online (Sandbox Code Playgroud) installation ×2
node.js ×2
typeerror ×2
bootstrap-4 ×1
build-tools ×1
cmake ×1
config ×1
dayjs ×1
dotenv ×1
download ×1
nativescript ×1
npm ×1
numpy ×1
popper.js ×1
popperjs ×1
properties ×1
python ×1
react-popper ×1
schedule ×1
tensorflow ×1
typescript ×1
ubuntu ×1
windows-10 ×1