Error: jest-haste-map: Haste module naming collision:

前端 未结 3 2017
挽巷
挽巷 2021-02-18 23:30

I have created a custom npm module (will use xxx instead of its name) and link it manually using npm install.

I tried very har

3条回答
  •  情歌与酒
    2021-02-19 00:11

    Add rn-cli.config.js In the root project

    const blacklist = require('metro-config/src/defaults/blacklist');
    module.exports = {
     resolver: {
        blacklistRE: blacklist([
            /node_modules\/.*\/node_modules\/react-native\/.*/,
        ])
     },
    };
    

    see this issue

    Hope it works for you

提交回复
热议问题