ember-cli-deploy/ember-cli-deploy-s3

Error: Cannot find module './lib/aws'

Closed this issue · 7 comments

Started getting this on Codeship when running ember deploy staging --activate=true

Visit http://ember-cli.com/user-guide/#watchman for more info.
bootstrap-sassy config: some JS loaded [], glyphicons disabled
Error: Cannot find module './lib/aws'
Error: Cannot find module './lib/aws'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/home/rof/src/github.com/CRaKN/crakn/node_modules/ember-cli-deploy-lightning-pack/node_modules/ember-cli-deploy-s3/node_modules/aws-sdk/index.js:2:18)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)

Here is our packages.json relevant lines:

  "devDependencies": {
    "active-model-adapter": "2.1.1",
    "broccoli-asset-rev": "2.4.2",
    "broccoli-funnel": "1.0.1",
    "broccoli-merge-trees": "1.1.1",
    "broccoli-sass": "0.7.0",
    "ember-ajax": "0.7.1",
    "ember-buffered-proxy": "0.5.1",
    "ember-cli": "~2.4",
    "ember-cli-app-version": "1.0.0",
    "ember-cli-autoprefixer": "0.6.0",
    "ember-cli-babel": "5.1.6",
    "ember-cli-bootstrap-sassy": "0.5.3",
    "ember-cli-dependency-checker": "1.2.0",
    "ember-cli-deploy": "0.6.0",
    "ember-cli-deploy-lightning-pack": "0.6.10",
    "ember-cli-deprecation-workflow": "^0.2.0",
    "ember-cli-dotenv": "1.2.0",
    "ember-cli-htmlbars": "1.0.3",
    "ember-cli-htmlbars-inline-precompile": "0.3.5",
    "ember-cli-ic-ajax": "0.2.4",
    "ember-cli-inject-live-reload": "1.4.0",
    "ember-cli-mirage": "0.1.13",
    "ember-cli-mocha": "0.10.1",
    "ember-cli-moment-shim": "1.1.0",
    "ember-cli-rails-addon": "~> 0.7.0",
    "ember-cli-uglify": "~1.2.0",
    "ember-cli-uploader": "^0.3.9",
    "ember-composable-helpers": "0.21.1",
    "ember-data": "~2.4",
    "ember-disable-proxy-controllers": "1.0.1",
    "ember-export-application-global": "1.0.5",
    "ember-load-initializers": "0.5.1",
    "ember-modal-dialog": "0.8.3",
    "ember-moment": "6.1.0",
    "ember-one-way-controls": "0.5.3",
    "ember-resolver": "2.0.3",
    "ember-route-action-helper": "0.3.0",
    "ember-simple-auth": "1.0.1",
    "ember-truth-helpers": "1.2.0",
    "ember-validations": "~2.0.0-alpha.4",
    "liquid-fire": "0.26.1",
    "loader.js": "^4.0.0",
    "aws-sdk": "2.7.19"
  }

@campbecf I'm afraid aws-sdk had a breaking change of sorts but havn't had time to investigate yet.

would you be amenable to dig deeper and report back your findings?

we require "aws-sdk": "^2.6.12", but you seem to have "aws-sdk": "2.7.19" locked in your package.json

maybe you can try to remove that and nombom ? (or nuke cache on codeship, or easier test locally first)

thanks for the help!

@ghedamat I originally didn't have the aws-sdk in my packages.json at all and tried to roll back to an earlier version to fix it (2.7.19). I'll try a few other versions and see what results I get. Oddly enough this seems to work fine locally, just not on Codeship.

It appears that setting aws-sdk to 2.6.8 resolved this. No idea if a later version would have worked as well but anything above 2.7.19 seemed to not work on Codeship.

Weird but glad it's working now!

@ghedamat seems like this may be a problem for other people, no? If aws-sdk had a semver violation wouldn't that be a problem for our version matcher?

@lukemelia I'm afraid you're right and I made a mistake

https://github.com/npm/node-semver#caret-ranges-123-025-004

we are still using ^ instead of ~ so on a clean install we'd probably get the 2.7.X version of aws-sdk

that said it's been working locally fine for me and also @campbecf after nombom so I'm not sure if it's something odd in the codeship setup..

feel free to reopen if you think it would make it easier to track

Let's wait and see. I'm surprised aws-sdk would have an egregious semver violation