开发者问题收集
我是 React 新手,我使用这个解释来构建一个基本的 React 应用程序:当我尝试使用npm create-react-app trail-app创建新的 React 应用程序时,它返回D:\sws projects\reactApp>D:\sws projects\reactApp>npm create-react-app trail-appUsage: npm <command>where
我只想使用以下命令创建一个新的React应用:npx start-react-app my_new_app但是我收到此错误:npm ERR! code E404npm ERR! 404 Not Found: crate-react-app@latestnpm ERR! A complete log of this run can be found in:npm ERR! /Users/hu
-->create-react-app : File C:\Users\ADMIN\AppData\Roaming\npm\create-react-app.ps1 cannot be loaded because runningscripts is disabled on this system. For more information, see about_Execution_Policie
创建 React 应用时出现图片中的错误。这段时间它一直运行正常,我所做的就是 mkdir 并 cd 到该目录。错误如下所示...npx:在 36.634 秒内安装了 99必须使用 import 来加载 ES 模块:C:\Users\Neeraj\AppData\Roaming\npm-cache_npx\5172\node_modules\create-react-app\node_module
我已经在电脑上安装了 react js。我尝试通过create-react-app react-app在 cmd 中创建一个 react 应用,但出现了以下错误:C:\Users\Ahnaaf Al Rafee>create-react-app react-appCreating a new React app in C:\Users\Ahnaaf Al Rafee\react-app.Insta
$ npx create-react-app awesomeApp错误:EPERM:操作不允许,mkdir 'C:\Users\'未找到命令:create-react-app
我一直在尝试创建一个 React 应用程序,所以基本上是一个新项目,例如 hello world 或任何东西。我尝试使用npx create-react-app my-app我收到的错误是:You are running `create-react-app` 4.0.0, which is behind the latest release (4.0.1).We no longer support
之前用起来还好。但是现在不行了。这是什么原因?该怎么办?无法读取location prop。在header代码中添加了withRouter,然后这次FriendsHeader就报错了。这是我的FriendsHeader代码import React from "react";import styled from "styled-components";import { Container } fro
我收到此错误:Cannot read property 'map' of undefined newindex.android.bundle?platform=android&dev=false&hot=false&minify=false:87221:34ReactCompositeComponentWrapper._constructComponentWithoutOwnerindex.and
尝试理解 props,如果犯了一个愚蠢的错误,请原谅我。我尝试将所有数据传递到一个变量中,并将其传递到 props 中(使用 {item.text} 和 {item.key}),但是我的“.map”没有拾取任何内容,并且出现一堆错误,我的代码出了什么问题?问题具体出在这块代码中 createList(list) {return <li>{list.text}</li>}render()
感谢您的帮助,我更新了我的代码。当我使用 Expo 启动应用程序时,打开成功,但我丢失了扫描图标,它没有出现在我的屏幕上。这个图标以前出现过。这个想法是扫描一些条形码以显示来自产品的相关数据。这是我的新代码:import React, { useState, useEffect } from "react";import {StyleSheet,Text,View,FlatList,Button,
我正在创建 select 的自定义组件,但遇到了一些问题。显示此错误无法读取未定义的属性“map”。我想映射 select 选项并在 props 页面中使用function CustomSelect(props) {const classes = useStyles();const options = ["Religion","Internal ","Not Profit",];const {ag
当我点击 JSX 中的 Pressable 元素时,我收到错误:Undefined 不是函数(靠近“... wines.map ...”)。日志显示它来自 JSX 中的wines.map循环。我不确定我尝试更改toggle函数中的数据的方式或我设置默认useState数组对象的方式可能存在什么问题。代码应该为每个按钮独立切换两种不同类型的图像。/*** Sample React Native Ap
我是 React 的新手。我通过 API 获取 pokemon。基本上,当我单击其中一个 pokemon 时,我想了解该 pokemon 的详细信息。但是,我在标题中收到此错误。我知道我的 PokemonDetail.js 文件中存在问题。但是我无法将信息从 app.js 传输到 pokemonDetail.js 文件。我该怎么做?感谢您的时间。另外,我英语不好,所以这是我的项目。https://
我有一个名为 displayKeyHelpers.ts 的文件,members.map代码位于第 118 行。该代码适用于大多数用户和 QA,但偶尔似乎成员未定义。我正在查看一份崩溃报告,上面写着displayKeyHelpers.ts, line 118SIGABRT: Unhandled JS Exception: TypeError: undefined is not an object (