{"action":"created","issue":{"url":"https://api.github.com/repos/static-dev/spike/issues/85","repository_url":"https://api.github.com/repos/static-dev/spike","labels_url":"https://api.github.com/repos/static-dev/spike/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/static-dev/spike/issues/85/comments","events_url":"https://api.github.com/repos/static-dev/spike/issues/85/events","html_url":"https://github.com/static-dev/spike/issues/85","id":285049081,"number":85,"title":"Fails with third-party pug code: TypeError: Cannot read property 'line' of undefined","user":{"login":"maotora","id":5174884,"avatar_url":"https://avatars2.githubusercontent.com/u/5174884?v=4","gravatar_id":"","url":"https://api.github.com/users/maotora","html_url":"https://github.com/maotora","followers_url":"https://api.github.com/users/maotora/followers","following_url":"https://api.github.com/users/maotora/following{/other_user}","gists_url":"https://api.github.com/users/maotora/gists{/gist_id}","starred_url":"https://api.github.com/users/maotora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maotora/subscriptions","organizations_url":"https://api.github.com/users/maotora/orgs","repos_url":"https://api.github.com/users/maotora/repos","events_url":"https://api.github.com/users/maotora/events{/privacy}","received_events_url":"https://api.github.com/users/maotora/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-12-29T07:44:57Z","updated_at":"2017-12-30T18:06:08Z","closed_at":"2017-12-29T07:58:00Z","author_association":"NONE","body":"Hello,\r\n\r\nI'm including a pug code which looks exactly like `sgr` code but it keeps on failing with error\r\n\r\n```\r\n✗ ERROR\r\n{ ModuleBuildError: Module build failed: TypeError: Cannot read property 'line' of undefined\r\n    at new ReshapeError (/home/user/Projects/Sites/archnoob/node_modules/reshape/lib/error.js:8:33)\r\n    at new ReshapePluginError (/home/user/Projects/Sites/archnoob/node_modules/reshape/lib/error.js:43:28)\r\n    at mergeExtendsAndLayout (/home/user/Projects/Sites/archnoob/node_modules/reshape-layouts/lib/index.js:84:11)\r\n    at tree.reduce (/home/user/Projects/Sites/archnoob/node_modules/reshape-layouts/lib/index.js:54:18)\r\n    at Array.reduce (<anonymous>)\r\n    at handleExtendsNodes (/home/user/Projects/Sites/archnoob/node_modules/reshape-layouts/lib/index.js:26:15)\r\n    at layoutsPlugin (/home/user/Projects/Sites/archnoob/node_modules/reshape-layouts/lib/index.js:16:12)\r\n    at W.reduce (/home/user/Projects/Sites/archnoob/node_modules/reshape/lib/index.js:47:60)\r\n    at tryCatchResolve (/home/user/Projects/Sites/archnoob/node_modules/when/lib/apply.js:46:23)\r\n    at callAndResolve (/home/user/Projects/Sites/archnoob/node_modules/when/lib/apply.js:30:12)\r\n    at runLoaders (/home/user/Projects/Sites/archnoob/node_modules/webpack/lib/NormalModule.js:195:19)\r\n    at /home/user/Projects/Sites/archnoob/node_modules/loader-runner/lib/LoaderRunner.js:364:11\r\n    at /home/user/Projects/Sites/archnoob/node_modules/loader-runner/lib/LoaderRunner.js:230:18\r\n    at context.callback (/home/user/Projects/Sites/archnoob/node_modules/loader-runner/lib/LoaderRunner.js:111:13)\r\n    at tryCatchReject (/home/user/Projects/Sites/archnoob/node_modules/when/lib/makePromise.js:845:30)\r\n    at runContinuation1 (/home/user/Projects/Sites/archnoob/node_modules/when/lib/makePromise.js:804:4)\r\n    at Rejected.when (/home/user/Projects/Sites/archnoob/node_modules/when/lib/makePromise.js:625:4)\r\n    at Pending.run (/home/user/Projects/Sites/archnoob/node_modules/when/lib/makePromise.js:483:13)\r\n    at Scheduler._drain (/home/user/Projects/Sites/archnoob/node_modules/when/lib/Scheduler.js:62:19)\r\n    at Scheduler.drain (/home/user/Projects/Sites/archnoob/node_modules/when/lib/Scheduler.js:27:9) id: '7608ad6d' }\r\n```\r\n\r\nThe pug code included in my `layout.sgr` file for simplicity.\r\n\r\n```pug\r\ndoctype html\r\nhtml\r\n  head\r\n    meta(charset='utf-8')\r\n    meta(http-equiv='X-UA-Compatible' content='IE=edge')\r\n    meta(name='description' content='')\r\n    meta(name='author' content='maotora')\r\n    meta(name='viewport' content='width=device-width, initial-scale=1')\r\n\r\n    block(name='title')\r\n      title Welcome To ArchNoob\r\n\r\n    link(rel='stylesheet' href='css/index.css')\r\n\r\n  body\r\n    main(role='main' id='{{ pageId }}')\r\n        section.pug_code\r\n            section.stackoverflow_badge\r\n                .so-card\r\n                    a(href=\"https://stackoverflow.com/users/2405689/archnoob\", target=\"_blank\").so-profile-link\r\n\r\n                .so-header\r\n                    span.so-logo\r\n                    img(src=\"http://cdn.sstatic.net/stackexchange/img/logos/so/so-icon.png\")\r\n                    .so-profile-picture-container\r\n                    img(src=\"https://www.gravatar.com/avatar/10940e5ff8f37a7cd084f0cbceac74a2?s=128&d=identicon&r=PG\")\r\n                    h4.so-display-name Mudassir Ali\r\n\r\n                .so-content\r\n                    p.so-reputation 3476\r\n                    small.so-reputation-label Stackoverflow reputation\r\n\r\n                .so-footer\r\n                    span.so-badges-label Badges\r\n                    span.so-badge-wrapper\r\n                    span.so-badge.so-badge-gold\r\n                    span.so-badge-count 0\r\n                    span.so-badge-wrapper\r\n                    span.so-badge.so-badge-silver\r\n                    span.so-badge-count 10\r\n                    span.so-badge-wrapper\r\n                    span.so-badge.so-badge-bronze\r\n                    span.so-badge-count 34\r\n\r\n    block(name='javascript')\r\n      script(src='js/main.js' defer)\r\n\r\n```\r\n\r\nI had to include it in the `layout.sgr` to see the error otherwise it was just rendering fine but none of the third-party pug code got rendered to the browser.\r\n\r\nI found this code [here](https://codepen.io/mudassir0909/pen/KwadQK) and it works okay as I even tried it in another pug - html converter."},"comment":{"url":"https://api.github.com/repos/static-dev/spike/issues/comments/354559967","html_url":"https://github.com/static-dev/spike/issues/85#issuecomment-354559967","issue_url":"https://api.github.com/repos/static-dev/spike/issues/85","id":354559967,"user":{"login":"jescalan","id":556932,"avatar_url":"https://avatars2.githubusercontent.com/u/556932?v=4","gravatar_id":"","url":"https://api.github.com/users/jescalan","html_url":"https://github.com/jescalan","followers_url":"https://api.github.com/users/jescalan/followers","following_url":"https://api.github.com/users/jescalan/following{/other_user}","gists_url":"https://api.github.com/users/jescalan/gists{/gist_id}","starred_url":"https://api.github.com/users/jescalan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jescalan/subscriptions","organizations_url":"https://api.github.com/users/jescalan/orgs","repos_url":"https://api.github.com/users/jescalan/repos","events_url":"https://api.github.com/users/jescalan/events{/privacy}","received_events_url":"https://api.github.com/users/jescalan/received_events","type":"User","site_admin":false},"created_at":"2017-12-30T18:06:08Z","updated_at":"2017-12-30T18:06:08Z","author_association":"OWNER","body":"👍 - be careful with pasting in pug code too, while similar, sugarml is not pug-compatible"}}
{"actor":{"display_login":"jescalan"}}