{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/nunjucks/issues/392","labels_url":"https://api.github.com/repos/mozilla/nunjucks/issues/392/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/nunjucks/issues/392/comments","events_url":"https://api.github.com/repos/mozilla/nunjucks/issues/392/events","html_url":"https://github.com/mozilla/nunjucks/issues/392","id":60569043,"number":392,"title":"Strict mode and SyntaxError","user":{"login":"SamyPesse","id":845425,"avatar_url":"https://avatars.githubusercontent.com/u/845425?v=3","gravatar_id":"","url":"https://api.github.com/users/SamyPesse","html_url":"https://github.com/SamyPesse","followers_url":"https://api.github.com/users/SamyPesse/followers","following_url":"https://api.github.com/users/SamyPesse/following{/other_user}","gists_url":"https://api.github.com/users/SamyPesse/gists{/gist_id}","starred_url":"https://api.github.com/users/SamyPesse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamyPesse/subscriptions","organizations_url":"https://api.github.com/users/SamyPesse/orgs","repos_url":"https://api.github.com/users/SamyPesse/repos","events_url":"https://api.github.com/users/SamyPesse/events{/privacy}","received_events_url":"https://api.github.com/users/SamyPesse/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-10T21:03:46Z","updated_at":"2015-03-10T21:12:18Z","closed_at":null,"body":"I know almost nothing about consequence of \"strict mode\" but since #386 has been merged, include Nunjucks in GitbookIO/gitbook crash on OS X and Windows with:\r\n\r\n```\r\n/Users/samypesse/Projects/GitBook/nunjucks/src/precompile.js:61\r\n        function addTemplates(dir) {\r\n        ^^^^^^^^\r\nSyntaxError: In strict mode code, functions can only be declared at top level or immediately within another function.\r\n    at Module._compile (module.js:439:25)\r\n    at Object.Module._extensions..js (module.js:474:10)\r\n    at Module.load (module.js:356:32)\r\n    at Function.Module._load (module.js:312:12)\r\n    at Module.require (module.js:364:17)\r\n```\r\n\r\nAm I doing something wrong?"},"comment":{"url":"https://api.github.com/repos/mozilla/nunjucks/issues/comments/78149358","html_url":"https://github.com/mozilla/nunjucks/issues/392#issuecomment-78149358","issue_url":"https://api.github.com/repos/mozilla/nunjucks/issues/392","id":78149358,"user":{"login":"jlongster","id":17031,"avatar_url":"https://avatars.githubusercontent.com/u/17031?v=3","gravatar_id":"","url":"https://api.github.com/users/jlongster","html_url":"https://github.com/jlongster","followers_url":"https://api.github.com/users/jlongster/followers","following_url":"https://api.github.com/users/jlongster/following{/other_user}","gists_url":"https://api.github.com/users/jlongster/gists{/gist_id}","starred_url":"https://api.github.com/users/jlongster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlongster/subscriptions","organizations_url":"https://api.github.com/users/jlongster/orgs","repos_url":"https://api.github.com/users/jlongster/repos","events_url":"https://api.github.com/users/jlongster/events{/privacy}","received_events_url":"https://api.github.com/users/jlongster/received_events","type":"User","site_admin":false},"created_at":"2015-03-10T21:12:18Z","updated_at":"2015-03-10T21:12:18Z","body":"Ok, thanks. Just convert it into a `var addTemplates = function() {}`.  I think @popomore was going to fix that in a follow-up PR, but feel free to go ahead and fix it."}}