首页 > 科技 > react native命令行全局安装

react native命令行全局安装

命令行npm install -g react-native-cli

rn的架构图:

C:\MyApp\node-v10.16.3-win-x64\node_modules\react-native-cli

这个index.js里有很多有用的信息,当遇到react native的各种错误时,搞清楚他们的原理有助于问题定位:

rn需要的依赖库:

'use strict';

var fs = require('fs');

var path = require('path');

var exec = require('child_process').exec;

var execSync = require('child_process').execSync;

var chalk = require('chalk');

var prompt = require('prompt');

var semver = require('semver');

// Use Yarn if available, it's much faster than the npm client.

// Return the version of yarn installed on the system, null if yarn is not available.

function getYarnVersionIfAvailable() {

本文来自投稿,不代表本人立场,如若转载,请注明出处:http://www.souzhinan.com/kj/111933.html