{"action":"created","issue":{"url":"https://api.github.com/repos/zeit/next.js/issues/2562","repository_url":"https://api.github.com/repos/zeit/next.js","labels_url":"https://api.github.com/repos/zeit/next.js/issues/2562/labels{/name}","comments_url":"https://api.github.com/repos/zeit/next.js/issues/2562/comments","events_url":"https://api.github.com/repos/zeit/next.js/issues/2562/events","html_url":"https://github.com/zeit/next.js/issues/2562","id":243047681,"number":2562,"title":"next export builds, but errors in client…","user":{"login":"remy","id":13700,"avatar_url":"https://avatars0.githubusercontent.com/u/13700?v=4","gravatar_id":"","url":"https://api.github.com/users/remy","html_url":"https://github.com/remy","followers_url":"https://api.github.com/users/remy/followers","following_url":"https://api.github.com/users/remy/following{/other_user}","gists_url":"https://api.github.com/users/remy/gists{/gist_id}","starred_url":"https://api.github.com/users/remy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remy/subscriptions","organizations_url":"https://api.github.com/users/remy/orgs","repos_url":"https://api.github.com/users/remy/repos","events_url":"https://api.github.com/users/remy/events{/privacy}","received_events_url":"https://api.github.com/users/remy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-14T16:33:59Z","updated_at":"2018-04-12T21:04:47Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"<!-- Checked checkbox should look like this: [x] -->\r\n- [x] I have searched the [issues](https://github.com/zeit/next.js/issues) of this repository and believe that this is not a duplicate.\r\n\r\n## Expected Behavior\r\n\r\nClient side routing, navigation and routing would work.\r\n\r\n## Current Behavior\r\n\r\nRan `next export` and when I serve locally (and online) there's a client side JavaScript error that breaks all the client side logic.\r\n\r\nWithout sourcemaps (or any other debugging tools?) I can't work out what's happening. Live URL: https://dkfyjniin9u60.cloudfront.net/ (see console in browser).\r\n\r\nNot sure I can replicate as yet, as it's larger site - pretty sure the vanilla examples work.\r\n\r\n## Context\r\n\r\nIncluding the `next.config.js` - possibly this is factoring?\r\n\r\n```js\r\nconst { env } = process;\r\nconst webpack = require('webpack');\r\n\r\nmodule.exports = {\r\n  exportPathMap () {\r\n    // we fetch our list of posts, this allow us to dynamically generate the exported pages\r\n    const all = require('./server/lib/docs');\r\n\r\n    // transform the list of posts into a map of pages with the pathname `/post/:id`\r\n    const pages = all.posts.docs.reduce((pages, post) =>\r\n      Object.assign({}, pages, {\r\n        [`${post.url}`]: {\r\n          page: '/_post',\r\n          query: { slug: post.slug }\r\n        }\r\n      }),\r\n    {});\r\n\r\n    // combine the map of post pages with the home\r\n    return Object.assign({}, pages, {\r\n      '/': { page: '/' }\r\n    });\r\n  },\r\n\r\n  webpack: function (config) {\r\n    // this exposes everything on process.env.X\r\n    const webpackEnv = Object.keys(env).reduce((acc, curr) => {\r\n      acc[`process.env.${curr}`] = JSON.stringify(env[curr]);\r\n      return acc;\r\n    }, {});\r\n\r\n    config.plugins.push(new webpack.DefinePlugin(webpackEnv));\r\n\r\n    return config;\r\n  }\r\n};\r\n```\r\n\r\n\r\n## Your Environment\r\n<!--- Include as many relevant details about the environment you experienced the bug in -->\r\n| Tech    | Version |\r\n|---------|---------|\r\n| next    |      3.0.1-beta.13   |\r\n| node    |     8.1.0    |\r\n| OS      |     Mac 10.10.3 (14D136)    |\r\n| browser |   Chrome Version 61.0.3156.0 (Official Build) canary (64-bit)  |\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/zeit/next.js/issues/comments/380943954","html_url":"https://github.com/zeit/next.js/issues/2562#issuecomment-380943954","issue_url":"https://api.github.com/repos/zeit/next.js/issues/2562","id":380943954,"user":{"login":"CodeOtter","id":2237846,"avatar_url":"https://avatars2.githubusercontent.com/u/2237846?v=4","gravatar_id":"","url":"https://api.github.com/users/CodeOtter","html_url":"https://github.com/CodeOtter","followers_url":"https://api.github.com/users/CodeOtter/followers","following_url":"https://api.github.com/users/CodeOtter/following{/other_user}","gists_url":"https://api.github.com/users/CodeOtter/gists{/gist_id}","starred_url":"https://api.github.com/users/CodeOtter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodeOtter/subscriptions","organizations_url":"https://api.github.com/users/CodeOtter/orgs","repos_url":"https://api.github.com/users/CodeOtter/repos","events_url":"https://api.github.com/users/CodeOtter/events{/privacy}","received_events_url":"https://api.github.com/users/CodeOtter/received_events","type":"User","site_admin":false},"created_at":"2018-04-12T21:04:47Z","updated_at":"2018-04-12T21:04:47Z","author_association":"NONE","body":"I cannot find any instructions, examples, or insights on how to turn sourcemaps on for any project in Next.js.\r\n\r\nWithout this ability, I will be left with no choice but to abandon using it ever again.  I can't fix what I can't see, and without the ability to debug, no other feature NextJS offers is even worth it."}}
{"actor":{"display_login":"CodeOtter"}}