{"action":"created","issue":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/8760","repository_url":"https://api.github.com/repos/travis-ci/travis-ci","labels_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/8760/labels{/name}","comments_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/8760/comments","events_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/8760/events","html_url":"https://github.com/travis-ci/travis-ci/issues/8760","id":273843234,"number":8760,"title":"Suddenly getting  Local gulp not found while doing npm publish","user":{"login":"amir20","id":260667,"avatar_url":"https://avatars3.githubusercontent.com/u/260667?v=4","gravatar_id":"","url":"https://api.github.com/users/amir20","html_url":"https://github.com/amir20","followers_url":"https://api.github.com/users/amir20/followers","following_url":"https://api.github.com/users/amir20/following{/other_user}","gists_url":"https://api.github.com/users/amir20/gists{/gist_id}","starred_url":"https://api.github.com/users/amir20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amir20/subscriptions","organizations_url":"https://api.github.com/users/amir20/orgs","repos_url":"https://api.github.com/users/amir20/repos","events_url":"https://api.github.com/users/amir20/events{/privacy}","received_events_url":"https://api.github.com/users/amir20/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-14T15:54:22Z","updated_at":"2017-11-28T12:09:31Z","closed_at":null,"author_association":"NONE","body":"I am creating an issue in hopes that someone else may find this helpful as I have still not found a solution to it. \r\n\r\nI have a `package.json` file that has the following \r\n\r\n```\r\n\"scripts\": {\r\n    \"lint\": \"eslint . && flow check\",\r\n    \"test\": \"npm run lint && jest\",\r\n    \"pretest\": \"gulp build:test\",\r\n    \"prepublishOnly\": \"gulp build\"\r\n  }\r\n```\r\n\r\nI have `npm publish` on tags using `.travis.yml`. My file looks like:\r\n\r\n```\r\nsudo: false\r\nlanguage: node_js\r\nnode_js:\r\n- stable\r\n- '9'\r\n- '8'\r\n- '7'\r\ncache:\r\n  directories:\r\n    - \"node_modules\"\r\ndeploy:\r\n  provider: npm\r\n  email: findamir@gmail.com\r\n  api_key:\r\n    secure: **********\r\n  on:\r\n    tags: true\r\n    repo: amir20/phantomjs-node\r\nbefore_script:\r\n  - npm install -g gulp-cli\r\nbefore_install:\r\n- npm install -g codecov\r\nafter_success:\r\n- codecov\r\n```\r\n\r\nStarting recentely, I am getting an error when I tag and push. Example failed job is [here](https://travis-ci.org/amir20/phantomjs-node/jobs/301791681). \r\n\r\nThe error is:\r\n\r\n```\r\nNPM version: 5.5.1\r\nAuthenticated with email findamir@gmail.com\r\nCleaning up git repository with `git stash --all`. If you need build artifacts for deployment, set `deploy.skip_cleanup: true`. See https://docs.travis-ci.com/user/deployment/#Uploading-Files.\r\nSaved working directory and index state WIP on (no branch): 144397a 4.0.7\r\ndpl.3\r\nDeploying application\r\nNPM API key format changed recently. If your deployment fails, check your API key in ~/.npmrc.\r\nhttp://docs.travis-ci.com/user/deployment/npm/\r\n~/.npmrc size: 48\r\n> phantom@4.0.7 prepublishOnly .\r\n> gulp build\r\n[15:47:45] Local gulp not found in ~/build/amir20/phantomjs-node\r\n[15:47:45] Try running: npm install gulp\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! errno 1\r\nnpm ERR! phantom@4.0.7 prepublishOnly: `gulp build`\r\nnpm ERR! Exit status 1\r\nnpm ERR! \r\nnpm ERR! Failed at the phantom@4.0.7 prepublishOnly script.\r\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\r\nnpm WARN Local package.json exists, but node_modules missing, did you mean to install?\r\nnpm ERR! A complete log of this run can be found in:\r\nnpm ERR!     /home/travis/.npm/_logs/2017-11-14T15_47_45_655Z-debug.log\r\n``` \r\n\r\nI have followed the documentation and made sure that `npm install -g gulp-cli` works. If you look at the log then it does install it. However, I still get this error. It seems like during publishing, it is uses a different path where `gulp` is not found. \r\n\r\nAny body have this issue? "},"comment":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/comments/347503942","html_url":"https://github.com/travis-ci/travis-ci/issues/8760#issuecomment-347503942","issue_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/8760","id":347503942,"user":{"login":"ankon","id":1210641,"avatar_url":"https://avatars1.githubusercontent.com/u/1210641?v=4","gravatar_id":"","url":"https://api.github.com/users/ankon","html_url":"https://github.com/ankon","followers_url":"https://api.github.com/users/ankon/followers","following_url":"https://api.github.com/users/ankon/following{/other_user}","gists_url":"https://api.github.com/users/ankon/gists{/gist_id}","starred_url":"https://api.github.com/users/ankon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankon/subscriptions","organizations_url":"https://api.github.com/users/ankon/orgs","repos_url":"https://api.github.com/users/ankon/repos","events_url":"https://api.github.com/users/ankon/events{/privacy}","received_events_url":"https://api.github.com/users/ankon/received_events","type":"User","site_admin":false},"created_at":"2017-11-28T12:09:31Z","updated_at":"2017-11-28T12:09:31Z","author_association":"NONE","body":"This one talks about the 'local' gulp -- check your package.json whether you actually depend on gulp. `npm install -g gulp-cli` installs a _global_ gulp CLI, which uses the local gulp for actual work."}}
{"actor":{"display_login":"ankon"}}