{"action":"created","issue":{"url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/3694","repository_url":"https://api.github.com/repos/NativeScript/nativescript-cli","labels_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/3694/labels{/name}","comments_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/3694/comments","events_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/3694/events","html_url":"https://github.com/NativeScript/nativescript-cli/issues/3694","id":333933103,"node_id":"MDU6SXNzdWUzMzM5MzMxMDM=","number":3694,"title":"Postinstall fails on Antergos with EACCES: permission denied, mkdir '/usr/lib/node_modules/nativescript/docs/html'","user":{"login":"NickIliev","id":18008302,"node_id":"MDQ6VXNlcjE4MDA4MzAy","avatar_url":"https://avatars2.githubusercontent.com/u/18008302?v=4","gravatar_id":"","url":"https://api.github.com/users/NickIliev","html_url":"https://github.com/NickIliev","followers_url":"https://api.github.com/users/NickIliev/followers","following_url":"https://api.github.com/users/NickIliev/following{/other_user}","gists_url":"https://api.github.com/users/NickIliev/gists{/gist_id}","starred_url":"https://api.github.com/users/NickIliev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickIliev/subscriptions","organizations_url":"https://api.github.com/users/NickIliev/orgs","repos_url":"https://api.github.com/users/NickIliev/repos","events_url":"https://api.github.com/users/NickIliev/events{/privacy}","received_events_url":"https://api.github.com/users/NickIliev/received_events","type":"User","site_admin":false},"labels":[{"id":382166880,"node_id":"MDU6TGFiZWwzODIxNjY4ODA=","url":"https://api.github.com/repos/NativeScript/nativescript-cli/labels/os:%20linux","name":"os: linux","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-20T05:53:05Z","updated_at":"2018-06-20T10:40:40Z","closed_at":null,"author_association":"MEMBER","body":"_From @heapifyman on June 19, 2018 12:32_\n\n### Did you verify this is a real problem by searching the [NativeScript Forum](http://forum.nativescript.org) and the [other open issues in this repo](https://github.com/NativeScript/nativescript/issues)?\r\nyes\r\n\r\n### Tell us about the problem\r\nPostinstall script fails when running `sudo npm install -g nativescript`. It produces the following error message:\r\n\r\n```\r\n> nativescript@4.1.1 postinstall /usr/lib/node_modules/nativescript\r\n> node postinstall.js\r\n\r\nEACCES: permission denied, mkdir '/usr/lib/node_modules/nativescript/docs/html'\r\nFailed to display command help { Error: Unknown command 'post-install-cli'. Try '$ tns help' for a full list of supported commands.\r\n    at Errors.fail (/usr/lib/node_modules/nativescript/lib/common/errors.js:125:28)\r\n    at Errors.failWithoutHelp (/usr/lib/node_modules/nativescript/lib/common/errors.js:135:21)\r\n    at HelpService.<anonymous> (/usr/lib/node_modules/nativescript/lib/common/services/help-service.js:181:26)\r\n    at Generator.next (<anonymous>)\r\n    at fulfilled (/usr/lib/node_modules/nativescript/lib/common/services/help-service.js:4:58)\r\n    at process._tickCallback (internal/process/next_tick.js:68:7)\r\n  name: 'Exception',\r\n  message:\r\n   'Unknown command \\'post-install-cli\\'. Try \\'$ tns help\\' for a full list of supported commands.',\r\n  stack:\r\n   'Error: Unknown command \\'post-install-cli\\'. Try \\'$ tns help\\' for a full list of supported commands.\\n    at Errors.fail (/usr/lib/node_modules/nativescript/lib/common/errors.js:125:28)\\n    at Errors.failWithoutHelp (/usr/lib/node_modules/nativescript/lib/common/errors.js:135:21)\\n    at HelpService.<anonymous> (/usr/lib/node_modules/nativescript/lib/common/services/help-service.js:181:26)\\n    at Generator.next (<anonymous>)\\n    at fulfilled (/usr/lib/node_modules/nativescript/lib/common/services/help-service.js:4:58)\\n    at process._tickCallback (internal/process/next_tick.js:68:7)',\r\n  errorCode: 127,\r\n  suppressCommandHelp: true,\r\n  proxyAuthenticationRequired: false,\r\n  printOnStdout: undefined }\r\nError while reporting exception: Error: EACCES: permission denied, mkdir '/root/.local/share/.nativescript-cli'\r\nnpm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/nativescript/node_modules/fsevents):\r\nnpm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {\"os\":\"darwin\",\"arch\":\"any\"} (current: {\"os\":\"linux\",\"arch\":\"x64\"})\r\n```\r\n\r\nRunning `sudo node /usr/lib/node_modules/nativescript/postinstall.js` completes without errors.\r\n\r\n`/root/.local/share/.nativescript-cli` exists but maybe has wrong permissions?:\r\n`drwxr-xr-x 2 heapifyman root 4096 19. Jun 14:27 .nativescript-cli`\r\n\r\n### Which platform(s) does your issue occur on?\r\nAntergos Linux \r\nLinux 4.17.2-1-ARCH\r\n\r\n### Please provide the following version numbers that your issue occurs with:\r\n- CLI: 4.1.1\r\n\r\n### Please tell us how to recreate the issue in as much detail as possible.\r\nRun `sudo npm install -g nativescript`\r\n\r\n### Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.\r\nNo\r\n\r\n\r\n\r\n\n\n_Copied from original issue: NativeScript/NativeScript#5969_"},"comment":{"url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/comments/398705277","html_url":"https://github.com/NativeScript/nativescript-cli/issues/3694#issuecomment-398705277","issue_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/3694","id":398705277,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODcwNTI3Nw==","user":{"login":"Fatme","id":760518,"node_id":"MDQ6VXNlcjc2MDUxOA==","avatar_url":"https://avatars3.githubusercontent.com/u/760518?v=4","gravatar_id":"","url":"https://api.github.com/users/Fatme","html_url":"https://github.com/Fatme","followers_url":"https://api.github.com/users/Fatme/followers","following_url":"https://api.github.com/users/Fatme/following{/other_user}","gists_url":"https://api.github.com/users/Fatme/gists{/gist_id}","starred_url":"https://api.github.com/users/Fatme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fatme/subscriptions","organizations_url":"https://api.github.com/users/Fatme/orgs","repos_url":"https://api.github.com/users/Fatme/repos","events_url":"https://api.github.com/users/Fatme/events{/privacy}","received_events_url":"https://api.github.com/users/Fatme/received_events","type":"User","site_admin":false},"created_at":"2018-06-20T10:40:40Z","updated_at":"2018-06-20T10:40:40Z","author_association":"CONTRIBUTOR","body":"Hi @heapifyman,\r\n\r\nCan you please try to execute `sudo npm install -g nativescript --unsafe-perm`?\r\n"}}
{"actor":{"display_login":"Fatme"}}