{"action":"created","issue":{"url":"https://api.github.com/repos/MunifTanjim/minimo/issues/200","repository_url":"https://api.github.com/repos/MunifTanjim/minimo","labels_url":"https://api.github.com/repos/MunifTanjim/minimo/issues/200/labels{/name}","comments_url":"https://api.github.com/repos/MunifTanjim/minimo/issues/200/comments","events_url":"https://api.github.com/repos/MunifTanjim/minimo/issues/200/events","html_url":"https://github.com/MunifTanjim/minimo/issues/200","id":388543775,"node_id":"MDU6SXNzdWUzODg1NDM3NzU=","number":200,"title":"Error: Cannot find module 'glob' (lunr.js)","user":{"login":"gour","id":114592,"node_id":"MDQ6VXNlcjExNDU5Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/114592?v=4","gravatar_id":"","url":"https://api.github.com/users/gour","html_url":"https://github.com/gour","followers_url":"https://api.github.com/users/gour/followers","following_url":"https://api.github.com/users/gour/following{/other_user}","gists_url":"https://api.github.com/users/gour/gists{/gist_id}","starred_url":"https://api.github.com/users/gour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gour/subscriptions","organizations_url":"https://api.github.com/users/gour/orgs","repos_url":"https://api.github.com/users/gour/repos","events_url":"https://api.github.com/users/gour/events{/privacy}","received_events_url":"https://api.github.com/users/gour/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-07T07:56:54Z","updated_at":"2018-12-14T06:16:15Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nI'm trying to use Lunr.js to provide search on my site, but have the following problem:\r\n```\r\n$ node themes/minimo/scripts/generate-search-index-lunr.js \r\ninternal/modules/cjs/loader.js:605\r\n    throw err;\r\n    ^\r\nError: Cannot find module 'glob'\r\n    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)\r\n    at Function.Module._load (internal/modules/cjs/loader.js:529:25)\r\n    at Module.require (internal/modules/cjs/loader.js:658:17)\r\n    at require (internal/modules/cjs/helpers.js:22:18)\r\n    at Object.<anonymous> (/home/gour/prj/hugo/net/themes/minimo/scripts/generate-search-index-lunr.js:4:14)\r\n    at Module._compile (internal/modules/cjs/loader.js:722:30)\r\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)\r\n    at Module.load (internal/modules/cjs/loader.js:620:32)\r\n    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)\r\n    at Function.Module._load (internal/modules/cjs/loader.js:552:3)\r\n```\r\n\r\nI'm using latest version of the theme along with: \r\n\r\n```\r\n$  hugo version\r\nHugo Static Site Generator v0.52/extended linux/amd64 BuildDate: unknown\r\n```\r\nNot overly familiar with node packages, but here is the output:\r\n\r\n```\r\n$ npm list -g glob\r\n/usr/lib\r\n├─┬ asar@0.14.5\r\n│ ├── glob@6.0.4 \r\n│ └─┬ mksnapshot@0.3.1\r\n│   └─┬ fs-extra@0.26.7\r\n│     └─┬ rimraf@2.6.2\r\n│       └── glob@7.1.3 \r\n├── glob@7.1.3 \r\n└─┬ npm@6.4.1\r\n  ├─┬ cacache@11.2.0\r\n  │ └── glob@7.1.2  deduped\r\n  ├── glob@7.1.2 \r\n  ├─┬ init-package-json@1.10.3\r\n  │ └── glob@7.1.2  deduped\r\n  ├─┬ node-gyp@3.8.0\r\n  │ ├── glob@7.1.2 \r\n  │ └─┬ rimraf@2.6.2\r\n  │   └── glob@7.1.2  deduped\r\n  ├─┬ npm-registry-fetch@1.1.0\r\n  │ └─┬ make-fetch-happen@3.0.0\r\n  │   └─┬ cacache@10.0.4\r\n  │     └── glob@7.1.2  deduped\r\n  ├─┬ pacote@8.1.6\r\n  │ └── glob@7.1.2  deduped\r\n  ├─┬ read-package-json@2.0.13\r\n  │ └── glob@7.1.2  deduped\r\n  └─┬ rimraf@2.6.2\r\n    └── glob@7.1.2  deduped\r\n```\r\n\r\nAny hint what might be wrong?\r\n"},"comment":{"url":"https://api.github.com/repos/MunifTanjim/minimo/issues/comments/447226269","html_url":"https://github.com/MunifTanjim/minimo/issues/200#issuecomment-447226269","issue_url":"https://api.github.com/repos/MunifTanjim/minimo/issues/200","id":447226269,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzIyNjI2OQ==","user":{"login":"MunifTanjim","id":8050659,"node_id":"MDQ6VXNlcjgwNTA2NTk=","avatar_url":"https://avatars1.githubusercontent.com/u/8050659?v=4","gravatar_id":"","url":"https://api.github.com/users/MunifTanjim","html_url":"https://github.com/MunifTanjim","followers_url":"https://api.github.com/users/MunifTanjim/followers","following_url":"https://api.github.com/users/MunifTanjim/following{/other_user}","gists_url":"https://api.github.com/users/MunifTanjim/gists{/gist_id}","starred_url":"https://api.github.com/users/MunifTanjim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MunifTanjim/subscriptions","organizations_url":"https://api.github.com/users/MunifTanjim/orgs","repos_url":"https://api.github.com/users/MunifTanjim/repos","events_url":"https://api.github.com/users/MunifTanjim/events{/privacy}","received_events_url":"https://api.github.com/users/MunifTanjim/received_events","type":"User","site_admin":false},"created_at":"2018-12-14T06:16:15Z","updated_at":"2018-12-14T06:16:15Z","author_association":"OWNER","body":"@gour The most probable cause is, Node.js can't find the global installation folder. In that case, set the Environment Variable `NODE_PATH` to `/usr/lib/node_modules` as your global packages are in that directory.\r\n\r\nSo, `NODE_PATH=/usr/lib/node_modules node themes/minimo/scripts/generate-search-index-lunr.js`"}}
{"actor":{"display_login":"MunifTanjim"}}