RN about creating porting to Mac and react-native-vector-icons error on Windows PC

Source: Internet
Author: User
1 Enter project update npm As jerry pointed out, this is a bug in NPM. A fix is now available. You can use update NPM npm i -g npm. Removed React Native, npm remove --save react-native and reinstalled RN npm i --save react-native





2 error: bundling failed: Error: While resolving module `react-native-vector-icons / MaterialIcons`, the Haste package` react-native-vector-icons` was found. However the module `MaterialIcons` could not be found within the package. Indeed, none of these files exist:

 * `/Users/user/my-app/node_modules/react-native/local-cli/core/__fixtures__/files/MaterialIcons(.native||.ios.js|.native.js|.js|.ios.json | .native.json | .json) `
  * `/Users/user/my-app/node_modules/react-native/local-cli/core/__fixtures__/files/MaterialIcons/index(.native||.ios.js|.native.js|.js|.ios .json | .native.json | .json) `


first step
Use the RN 0.52.0 workaround for this in my project root directory in rn-cli.config.js:

const blacklist = require (‘metro / src / blacklist’)

module.exports = {
  getTransformModulePath () {
    return require.resolve (‘react-native-typescript-transformer’)
  },
  getSourceExts () {
    return [‘ts’, ‘tsx’]
  },
  getBlacklistRE () {
  return blacklist ([/ react-native \ / local-cli \ / core \ / __ fixtures __. * /])
  },
}

Second step
rm ./node_modules/react-native/local-cli/core/__fixtures__/files/package.json

Exit the program and run again
RN about creating on Windows computer, porting to Mac and react-native-vector-icons error
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.