你好,我是 React Native 的新手,所以我正忙于了解它的要点,所以在添加这段代码后,我开始收到以下错误。
[Unhandled promise rejection: Error: Unable to activate keep awake]
- node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:103:50 in promiseMethodWrapper
- node_modules/@unimodules/react-native-adapter/build /NativeModulesProxy.native.js:15:23 in moduleName.methodInfo.name
- node_modules/expo-keep-awake/build/index.js:10:58 in activateKeepAwake
- node_modules/expo/build/launch/registerRootComponent.expo.js:6:4 in <global>
- node_modules/metro/src/lib/polyfills/require.js:321:11 in loadModuleImplementation
- node_modules/expo/AppEntry.js:1:0 in <global>
- node_modules/metro/src/lib/polyfills/require.js:321:11 in loadModuleImplementation
- node_modules/metro/src/lib/polyfills/require.js:201:44 in guardedLoadModule
* http://192.168.1.96:19001/node_modules/expo/AppEntry.bundle?platform=android& dev=true&minify=false&hot=false:154700:3 in global code
Run Code Online (Sandbox Code Playgroud)
下面是我添加的可能导致该错误的代码
import { FloatingAction } from "react-native-floating-action";
const FloatingHomeButton = () => {
const actions = [
{
text: "Accessibility",
icon: require("../images/tweet.png"),
name: "bt_accessibility",
position: 2,
},
]; …Run Code Online (Sandbox Code Playgroud) 在 Puppeteer 上工作来学习,所以我正在尝试填写这个网站
脚本的作用是什么
问题
脚本
import tesseract from 'node-tesseract-ocr';
import Puppeteer from 'puppeteer';
const config = {
lang: 'eng', // default
oem: 3,
psm: 13,
};
export class AutomationController {
public async CreateProfile(data: any) {
try {
const _data = {
nationality: 'BRA',
id: '0508228690083',
title: 'Mr',
firstName: 'Shaun',
middleName: 'Maxwell',
surname: 'Smith',
dob: '15062001',
gender: 'M',
email: 'shaun@gmail.com',
countryCode: '+27',
mobileNumber: '0832567890',
};
const browser …Run Code Online (Sandbox Code Playgroud) 你好,所以我不知道这里有什么问题,所以当我运行我的 NodeJS 服务器时,猫鼬index.d.ts抛出了多个我不知道的错误,我尝试忽略tsconfig 中的 node_modules 但似乎我没有获胜
收到错误:我给了 pastebin 链接,因为回溯很长,我不想减少潜在的错误: pastebin 链接包含所有错误消息
错误标题
node_modules/@types/mongoose/index.d.ts:79:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: DocumentDefinition, FilterQuery, UpdateQuery, NativeError, Mongoose, SchemaTypes, STATES, connection, connections, models, mongo, version, CastError, ConnectionOptions, Collection, Connection, disconnected, connected, connecting, disconnecting, uninitialized, Error, QueryCursor, VirtualType, Schema, SchemaTypeOpts, Subdocument, Array, DocumentArray, Buffer, ObjectId, ObjectIdConstructor, Decimal128, Map, mquery, Aggregate, SchemaType, Promise, PromiseProvider, Model, Document, ModelUpdateOptions
Run Code Online (Sandbox Code Playgroud)
我的tsonfig
{
"compilerOptions": {
"module": "commonjs",
"esModuleInterop": …Run Code Online (Sandbox Code Playgroud) typescript ×2
javascript ×1
mongoose ×1
node.js ×1
puppeteer ×1
react-native ×1
web-scraping ×1