小编Mar*_*ang的帖子

使用`npm update`时如何更新package.json中的所有软件包版本号?

当我使用时npm update,我可以更新所有软件包,但package.json中的软件包版本号不变,在package.json中,具有devDependenciesdependencies,如下所示:

{
  "name": "test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "jquery": "^1.11.2"
  },
  "devDependencies": {
    "lodash": "^2.4.1"
  }
}
Run Code Online (Sandbox Code Playgroud)

如何使用一行命令更新所有软件包和numbner中的所有软件包,devDependencies并且dependencies也会更新。

json nodes node.js npm

5
推荐指数
2
解决办法
3579
查看次数

如何在某些项目和其他项目中禁用git而不在Visual Studio Code中禁用git?

一些项目我不想使用git监控,但在其他项目中我想继续使用git监控,我使用设置

"git.enabled": false,
"git.path": null,
"git.autofetch": false
Run Code Online (Sandbox Code Playgroud)

但它会禁用所有项目的git,那么如何为项目而不是编辑器设置Visual Studio Code git?

git editor visual-studio visual-studio-code

5
推荐指数
2
解决办法
2208
查看次数

如何使用反应原生图像onError获取错误消息?

我使用react本机v0.44图像组件为android,但图像无法加载,代码:

<View style={styles.slide1} key={index}>
                  <Image
                    style={styles.image}
                    resizeMode = 'contain'
                    onError = {(e)=>{
                      console.log(e)
                    }}
                    source={{uri:`http://i01.appmifile.com/webfile/globalimg/hk/cms/92247F5D-CC6E-273F-5710-841E891CB96F.jpg`}}
                  />
                </View>
Run Code Online (Sandbox Code Playgroud)

图像无法显示,onError句柄获取错误,但如何知道加载图像中的错误?

image react-native

5
推荐指数
1
解决办法
2121
查看次数

使用genymotion运行react native android debug打开http://10.0.3.2:8081/debugger-ui

描述

我在genymotions中运行react native android,当我打开JS Debugging时,Chrome op http://10.0.3.2:8081/debugger-ui而不是http:// localhost:8081 / debugger-ui /,因此genymotion日志无法连接调试,为什么?如何解决?

环境

  • macOS:10.13.3
  • 的Android:6.0.0
  • genymotion:2.12.0
  • 反应本机:0.53.3

android genymotion react-native

3
推荐指数
1
解决办法
1550
查看次数