{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/jest/issues/3285","repository_url":"https://api.github.com/repos/facebook/jest","labels_url":"https://api.github.com/repos/facebook/jest/issues/3285/labels{/name}","comments_url":"https://api.github.com/repos/facebook/jest/issues/3285/comments","events_url":"https://api.github.com/repos/facebook/jest/issues/3285/events","html_url":"https://github.com/facebook/jest/issues/3285","id":221120880,"number":3285,"title":"transformIgnorePatterns causes errors for npm linked packages","user":{"login":"richburdon","id":3523355,"avatar_url":"https://avatars1.githubusercontent.com/u/3523355?v=4","gravatar_id":"","url":"https://api.github.com/users/richburdon","html_url":"https://github.com/richburdon","followers_url":"https://api.github.com/users/richburdon/followers","following_url":"https://api.github.com/users/richburdon/following{/other_user}","gists_url":"https://api.github.com/users/richburdon/gists{/gist_id}","starred_url":"https://api.github.com/users/richburdon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richburdon/subscriptions","organizations_url":"https://api.github.com/users/richburdon/orgs","repos_url":"https://api.github.com/users/richburdon/repos","events_url":"https://api.github.com/users/richburdon/events{/privacy}","received_events_url":"https://api.github.com/users/richburdon/received_events","type":"User","site_admin":false},"labels":[{"id":442782992,"url":"https://api.github.com/repos/facebook/jest/labels/Needs%20more%20info","name":"Needs more info","color":"d4c5f9","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2017-04-12T00:51:56Z","updated_at":"2018-02-09T15:04:52Z","closed_at":"2017-10-05T16:52:37Z","author_association":"NONE","body":"**Do you want to request a *feature* or report a *bug*?**\r\nBug\r\n\r\n**What is the current behavior?**\r\nRunning simple tests works. Running tests that import npm linked packages causes errors; e.g.,\r\n\r\n> jest sanity\r\nCouldn't find preset \"react-native\" relative to directory \"demo/sub/ux/node_modules/my-linked-module/node_modules/react-apollo\"\r\n\r\n(My modules have no direct dep on \"react-native\", but there's a transitive dep via \"react-apollo\")\r\n\r\nBut, babel (and webpack and karma) all work fine. Also, jest works fine in the dependent module (my-linked-module).\r\n> babel-node src/web/sanity.test.js \r\nOK\r\n\r\n**If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can `yarn install` and `yarn test`.**\r\n\r\nCreate a dependency on another module via npm link.\r\nImport that module in a test (ES6 syntax):\r\nAdd: \"transformIgnorePatterns\": [ \"/!node_modules\\\\/my-linked-module/\" ] to package.json\r\n\r\n**What is the expected behavior?**\r\nIt should compile OK\r\n\r\n**Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.**\r\njest: v19.0.2\r\nnode: v7.5.0\r\nOSX 10.2\r\n\r\npackage.json\r\n  \"jest\": {\r\n    \"verbose\": true,\r\n    \"transformIgnorePatterns\": [\r\n      \"/!node_modules\\\\/my-linked-module/\"\r\n    ]\r\n  },\r\n\r\n.babelrc\r\n{\r\n  \"presets\": [\r\n    \"es2015\",\r\n    \"stage-0\",\r\n    \"react\"\r\n  ],\r\n\r\n  \"env\": {\r\n    \"test\": {\r\n      \"plugins\": [\"transform-es2015-modules-commonjs\"]\r\n    }\r\n  }\r\n}\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/jest/issues/comments/364458672","html_url":"https://github.com/facebook/jest/issues/3285#issuecomment-364458672","issue_url":"https://api.github.com/repos/facebook/jest/issues/3285","id":364458672,"user":{"login":"mtrabelsi","id":7538862,"avatar_url":"https://avatars2.githubusercontent.com/u/7538862?v=4","gravatar_id":"","url":"https://api.github.com/users/mtrabelsi","html_url":"https://github.com/mtrabelsi","followers_url":"https://api.github.com/users/mtrabelsi/followers","following_url":"https://api.github.com/users/mtrabelsi/following{/other_user}","gists_url":"https://api.github.com/users/mtrabelsi/gists{/gist_id}","starred_url":"https://api.github.com/users/mtrabelsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtrabelsi/subscriptions","organizations_url":"https://api.github.com/users/mtrabelsi/orgs","repos_url":"https://api.github.com/users/mtrabelsi/repos","events_url":"https://api.github.com/users/mtrabelsi/events{/privacy}","received_events_url":"https://api.github.com/users/mtrabelsi/received_events","type":"User","site_admin":false},"created_at":"2018-02-09T15:04:52Z","updated_at":"2018-02-09T15:04:52Z","author_association":"NONE","body":"What about this - it solved mine : \r\n```\r\n\r\n\"transformIgnorePatterns\": [\r\n      \"node_modules/(?!(jest-)?react-native|react-navigation)\"\r\n ]\r\n```\r\n"}}
{"actor":{"display_login":"mtrabelsi"}}