{"action":"opened","issue":{"url":"https://api.github.com/repos/faceyspacey/redux-first-router/issues/79","repository_url":"https://api.github.com/repos/faceyspacey/redux-first-router","labels_url":"https://api.github.com/repos/faceyspacey/redux-first-router/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/faceyspacey/redux-first-router/issues/79/comments","events_url":"https://api.github.com/repos/faceyspacey/redux-first-router/issues/79/events","html_url":"https://github.com/faceyspacey/redux-first-router/issues/79","id":250271579,"number":79,"title":"pathToRegexp.compile import issues in node 8","user":{"login":"kristfal","id":5638107,"avatar_url":"https://avatars2.githubusercontent.com/u/5638107?v=4","gravatar_id":"","url":"https://api.github.com/users/kristfal","html_url":"https://github.com/kristfal","followers_url":"https://api.github.com/users/kristfal/followers","following_url":"https://api.github.com/users/kristfal/following{/other_user}","gists_url":"https://api.github.com/users/kristfal/gists{/gist_id}","starred_url":"https://api.github.com/users/kristfal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristfal/subscriptions","organizations_url":"https://api.github.com/users/kristfal/orgs","repos_url":"https://api.github.com/users/kristfal/repos","events_url":"https://api.github.com/users/kristfal/events{/privacy}","received_events_url":"https://api.github.com/users/kristfal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-15T09:55:29Z","updated_at":"2017-08-15T09:55:29Z","closed_at":null,"body":"Hey,\r\n\r\nreally sweet project! Tons of kudos. One issue: I'm unable to match actions to routes using node 8.2.1. \r\n\r\nThe issue seems to stem from the way `pathToRegexp.compile` is imported in node 8. My project currently requires `path-to-regexp` at the root level of the project, and somehow this messes up the import in `actionToPath.js`. The result is a silent error when identifying `path` in `actionToPath.js` which in turn makes all actions result in route not found. \r\n\r\nI can resolve the issue by require the import in the following way:\r\n\r\n`const {compile} = require('../../node_modules/path-to-regexp');`\r\n\r\nand then use `compile` as is to evaluate the `path`. \r\n\r\nI haven't issued a PR as the test suite seems to be failing in both node 6 and 8. I don't know if this way of require will break on other versions of node or further complicate stuff, so let me know if you want any more info/help to fix it.\r\n\r\n\r\n"}}
{"actor":{"display_login":"kristfal"}}