{"action":"created","issue":{"url":"https://api.github.com/repos/bucharest-gold/centos7-s2i-nodejs/issues/92","repository_url":"https://api.github.com/repos/bucharest-gold/centos7-s2i-nodejs","labels_url":"https://api.github.com/repos/bucharest-gold/centos7-s2i-nodejs/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/bucharest-gold/centos7-s2i-nodejs/issues/92/comments","events_url":"https://api.github.com/repos/bucharest-gold/centos7-s2i-nodejs/issues/92/events","html_url":"https://github.com/bucharest-gold/centos7-s2i-nodejs/issues/92","id":324124968,"number":92,"title":"Can't resolve devDependencies when running npm scripts in container?","user":{"login":"lincolnthree","id":362329,"avatar_url":"https://avatars0.githubusercontent.com/u/362329?v=4","gravatar_id":"","url":"https://api.github.com/users/lincolnthree","html_url":"https://github.com/lincolnthree","followers_url":"https://api.github.com/users/lincolnthree/followers","following_url":"https://api.github.com/users/lincolnthree/following{/other_user}","gists_url":"https://api.github.com/users/lincolnthree/gists{/gist_id}","starred_url":"https://api.github.com/users/lincolnthree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lincolnthree/subscriptions","organizations_url":"https://api.github.com/users/lincolnthree/orgs","repos_url":"https://api.github.com/users/lincolnthree/repos","events_url":"https://api.github.com/users/lincolnthree/events{/privacy}","received_events_url":"https://api.github.com/users/lincolnthree/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-05-17T17:54:58Z","updated_at":"2018-05-18T14:06:08Z","closed_at":null,"author_association":"NONE","body":"Hey folks,\r\n\r\nNot exactly sure if this is user error, something I've missed, or a bug... but... here goes:\r\n\r\nEssentially I am having trouble getting an S2I build to run because some things seem to be missing, and I'm not sure why.\r\n\r\nThe image build actually succeeds, but when the node app actually spins up and starts running NPM_RUN scripts, it fails to find things like \"rimraf\" and \"cpy\" which are specified as devDependencies in the package.json file. I've even tried manually running npm install in the container, as well.\r\n\r\n```\r\ngit version 2.9.3\r\nEnvironment: \r\n\tDEV_MODE=false\r\n\tNODE_ENV=production\r\n\tDEBUG_PORT=5858\r\nRunning as user uid=1000140000 gid=0(root) groups=0(root),1000140000\r\nLaunching via npm...\r\nnpm info it worked if it ends with ok\r\nnpm info using npm@5.6.0\r\nnpm info using node@v10.1.0\r\nnpm info lifecycle launcher-frontend@0.0.7~prestart:openshift: launcher-frontend@0.0.7\r\nnpm info lifecycle launcher-frontend@0.0.7~start:openshift: launcher-frontend@0.0.7\r\n> launcher-frontend@0.0.7 start:openshift /opt/app-root/src\r\n> npm run setup && npm run build:prod\r\nnpm info it worked if it ends with ok\r\nnpm info using npm@5.6.0\r\nnpm info using node@v10.1.0\r\nnpm info lifecycle launcher-frontend@0.0.7~presetup: launcher-frontend@0.0.7\r\nnpm info lifecycle launcher-frontend@0.0.7~setup: launcher-frontend@0.0.7\r\n> launcher-frontend@0.0.7 setup /opt/app-root/src\r\n> npm install\r\nnpm info it worked if it ends with ok\r\nnpm info using npm@5.6.0\r\nnpm info using node@v10.1.0\r\nnpm info lifecycle launcher-frontend@0.0.7~preinstall: launcher-frontend@0.0.7\r\nnpm http fetch GET 200 https://registry.npmjs.org/rhoaster  172ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/nodeshift  179ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/openshift-config-loader  38ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/openshift-rest-client  38ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/openshift-rest-client/-/openshift-rest-client-1.1.1.tgz  34ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/yargs  57ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/openshift-config-loader  81ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/git-repo-info  88ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/js-yaml  89ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/chalk  94ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/find-up  31ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/cliui  32ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/string-width  24ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/which-module  28ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/yargs-parser  29ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/openshift-rest-client  126ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/rimraf  128ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/tar  129ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/esprima  35ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/ansi-styles  38ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/locate-path  34ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/supports-color  39ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/strip-ansi  26ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/os-locale  87ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/is-fullwidth-code-point  25ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/camelcase  25ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/chownr  34ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/fs-minipass  36ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/minipass  36ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/minizlib  33ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/safe-buffer  34ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/yallist  35ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/p-locate  29ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/glob  31ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/path-exists  25ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/has-flag  41ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/ansi-regex  41ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/execa  41ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/mem  39ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/p-limit  26ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/npm-run-path  27ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/mimic-fn  28ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/get-stream  29ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/p-try  25ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/p-finally  31ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/strip-eof  31ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/cross-spawn  32ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/path-key  23ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/shebang-command  22ms\r\nnpm http fetch GET 200 https://registry.npmjs.org/shebang-regex  19ms\r\nnpm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it!\r\nnpm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it!\r\nnpm info linkStuff launcher-frontend@0.0.7\r\nnpm info lifecycle launcher-frontend@0.0.7~install: launcher-frontend@0.0.7\r\nnpm info lifecycle launcher-frontend@0.0.7~postinstall: launcher-frontend@0.0.7\r\n> launcher-frontend@0.0.7 postinstall /opt/app-root/src\r\n> echo 'All done!'\r\nAll done!\r\nnpm info lifecycle undefined~preshrinkwrap: undefined\r\nnpm info lifecycle undefined~shrinkwrap: undefined\r\nnpm info lifecycle undefined~postshrinkwrap: undefined\r\nnpm WARN ngx-modal@0.0.29 requires a peer of @angular/core@^2.0.0 but none is installed. You must install peer dependencies yourself.\r\nnpm WARN ngx-modal@0.0.29 requires a peer of @angular/router@^3.0.0 but none is installed. You must install peer dependencies yourself.\r\nup to date in 2.952s\r\n┌───────────────────────────────────────────────────────────────┐\r\n│                    npm update check failed                    │\r\n│              Try running with sudo or get access              │\r\n│             to the local update config store via              │\r\n│ sudo chown -R $USER:$(id -gn $USER) /opt/app-root/src/.config │\r\n└───────────────────────────────────────────────────────────────┘\r\nnpm info ok \r\nnpm info lifecycle launcher-frontend@0.0.7~postsetup: launcher-frontend@0.0.7\r\n┌───────────────────────────────────────────────────────────────┐\r\n│                    npm update check failed                    │\r\n│              Try running with sudo or get access              │\r\n│             to the local update config store via              │\r\n│ sudo chown -R $USER:$(id -gn $USER) /opt/app-root/src/.config │\r\n└───────────────────────────────────────────────────────────────┘\r\nnpm info ok \r\nnpm info it worked if it ends with ok\r\nnpm info using npm@5.6.0\r\nnpm info using node@v10.1.0\r\nnpm info lifecycle launcher-frontend@0.0.7~prebuild:prod: launcher-frontend@0.0.7\r\n> launcher-frontend@0.0.7 prebuild:prod /opt/app-root/src\r\n> npm run clean-and-copy\r\nnpm info it worked if it ends with ok\r\nnpm info using npm@5.6.0\r\nnpm info using node@v10.1.0\r\nnpm info lifecycle launcher-frontend@0.0.7~preclean-and-copy: launcher-frontend@0.0.7\r\nnpm info lifecycle launcher-frontend@0.0.7~clean-and-copy: launcher-frontend@0.0.7\r\n> launcher-frontend@0.0.7 clean-and-copy /opt/app-root/src\r\n> npm run clean-dist && npm run copy-files\r\nnpm info it worked if it ends with ok\r\nnpm info using npm@5.6.0\r\nnpm info using node@v10.1.0\r\nnpm info lifecycle launcher-frontend@0.0.7~preclean-dist: launcher-frontend@0.0.7\r\nnpm info lifecycle launcher-frontend@0.0.7~clean-dist: launcher-frontend@0.0.7\r\n> launcher-frontend@0.0.7 clean-dist /opt/app-root/src\r\n> rimraf dist\r\nsh: rimraf: command not found\r\nnpm info lifecycle launcher-frontend@0.0.7~clean-dist: Failed to exec clean-dist script\r\nnpm ERR! file sh\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! errno ENOENT\r\nnpm ERR! syscall spawn\r\nnpm ERR! launcher-frontend@0.0.7 clean-dist: `rimraf dist`\r\nnpm ERR! spawn ENOENT\r\nnpm ERR! \r\nnpm ERR! Failed at the launcher-frontend@0.0.7 clean-dist script.\r\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\r\n┌───────────────────────────────────────────────────────────────┐\r\n│                    npm update check failed                    │\r\n│              Try running with sudo or get access              │\r\n│             to the local update config store via              │\r\n│ sudo chown -R $USER:$(id -gn $USER) /opt/app-root/src/.config │\r\n└───────────────────────────────────────────────────────────────┘\r\nnpm ERR! A complete log of this run can be found in:\r\nnpm ERR!     /opt/app-root/src/.npm/_logs/2018-05-17T17_33_56_057Z-debug.log\r\nnpm info lifecycle launcher-frontend@0.0.7~clean-and-copy: Failed to exec clean-and-copy script\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! errno 1\r\nnpm ERR! launcher-frontend@0.0.7 clean-and-copy: `npm run clean-dist && npm run copy-files`\r\nnpm ERR! Exit status 1\r\nnpm ERR! \r\nnpm ERR! Failed at the launcher-frontend@0.0.7 clean-and-copy script.\r\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\r\n┌───────────────────────────────────────────────────────────────┐\r\n│                    npm update check failed                    │\r\n│              Try running with sudo or get access              │\r\n│             to the local update config store via              │\r\n│ sudo chown -R $USER:$(id -gn $USER) /opt/app-root/src/.config │\r\n└───────────────────────────────────────────────────────────────┘\r\nnpm ERR! A complete log of this run can be found in:\r\nnpm ERR!     /opt/app-root/src/.npm/_logs/2018-05-17T17_33_56_105Z-debug.log\r\nnpm info lifecycle launcher-frontend@0.0.7~prebuild:prod: Failed to exec prebuild:prod script\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! errno 1\r\nnpm ERR! launcher-frontend@0.0.7 prebuild:prod: `npm run clean-and-copy`\r\nnpm ERR! Exit status 1\r\nnpm ERR! \r\nnpm ERR! Failed at the launcher-frontend@0.0.7 prebuild:prod script.\r\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\r\n┌───────────────────────────────────────────────────────────────┐\r\n│                    npm update check failed                    │\r\n│              Try running with sudo or get access              │\r\n│             to the local update config store via              │\r\n│ sudo chown -R $USER:$(id -gn $USER) /opt/app-root/src/.config │\r\n└───────────────────────────────────────────────────────────────┘\r\nnpm ERR! A complete log of this run can be found in:\r\nnpm ERR!     /opt/app-root/src/.npm/_logs/2018-05-17T17_33_56_142Z-debug.log\r\nnpm info lifecycle launcher-frontend@0.0.7~start:openshift: Failed to exec start:openshift script\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! errno 1\r\nnpm ERR! launcher-frontend@0.0.7 start:openshift: `npm run setup && npm run build:prod`\r\nnpm ERR! Exit status 1\r\nnpm ERR! \r\nnpm ERR! Failed at the launcher-frontend@0.0.7 start:openshift script.\r\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\r\n┌───────────────────────────────────────────────────────────────┐\r\n│                    npm update check failed                    │\r\n│              Try running with sudo or get access              │\r\n│             to the local update config store via              │\r\n│ sudo chown -R $USER:$(id -gn $USER) /opt/app-root/src/.config │\r\n└───────────────────────────────────────────────────────────────┘\r\nnpm ERR! A complete log of this run can be found in:\r\nnpm ERR!     /opt/app-root/src/.npm/_logs/2018-05-17T17_33_56_180Z-debug.log\r\n```\r\n\r\nI'm not a node expert so I'm a bit at a loss.\r\n\r\nThis is the repo: https://github.com/snowdrop/snowdrop-site-angular (deployment instructions I'm using are in the readme.)\r\n\r\nThese are the commands to run the S2I build that I'm using:\r\n```\r\nfind . | grep openshiftio | grep application | xargs -n 1 oc apply -f\r\noc new-app --template=snowdrop-site-angular\r\n```\r\n\r\nAny insight would be appreciated!"},"comment":{"url":"https://api.github.com/repos/bucharest-gold/centos7-s2i-nodejs/issues/comments/390218215","html_url":"https://github.com/bucharest-gold/centos7-s2i-nodejs/issues/92#issuecomment-390218215","issue_url":"https://api.github.com/repos/bucharest-gold/centos7-s2i-nodejs/issues/92","id":390218215,"user":{"login":"lincolnthree","id":362329,"avatar_url":"https://avatars0.githubusercontent.com/u/362329?v=4","gravatar_id":"","url":"https://api.github.com/users/lincolnthree","html_url":"https://github.com/lincolnthree","followers_url":"https://api.github.com/users/lincolnthree/followers","following_url":"https://api.github.com/users/lincolnthree/following{/other_user}","gists_url":"https://api.github.com/users/lincolnthree/gists{/gist_id}","starred_url":"https://api.github.com/users/lincolnthree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lincolnthree/subscriptions","organizations_url":"https://api.github.com/users/lincolnthree/orgs","repos_url":"https://api.github.com/users/lincolnthree/repos","events_url":"https://api.github.com/users/lincolnthree/events{/privacy}","received_events_url":"https://api.github.com/users/lincolnthree/received_events","type":"User","site_admin":false},"created_at":"2018-05-18T14:06:07Z","updated_at":"2018-05-18T14:06:07Z","author_association":"NONE","body":"Checking..."}}
{"actor":{"display_login":"lincolnthree"}}