Closed mindpivot closed 10 years ago
Ok so here's what's going on. In my package.json I have the following:
{
"name": "...",
"description": "...",
"author": "mindpivot",
"version": "0.0.4",
"private": true,
"scripts": {
"test": "grunt test",
"start": "bin/web",
"postinstall": "grunt build"
},
"dependencies": {
"kraken-js": "~0.7.0",
"express": "~3.4.8",
"adaro": "~0.1.x",
"nconf": "~0.6.9",
"less": "~1.6.1",
"makara": "~0.3.3",
"mongoose": "~3.8.5",
"newrelic": "~1.3.0",
"connect-mongo": "~0.4.0",
"connect-flash": "~0.1.1",
"view-helpers": "~0.1.4",
"async": "~0.2.10",
"dustjs-helpers": "~1.1.2",
"bcrypt": "~0.7.7",
"passport": "~0.2.0",
"passport-local": "~0.1.6",
"dustjs-linkedin": "~2.3.2", // Note version here
...
}
When I build and run locally using foreman, no issues. However, when I then commit everything in git then push using the heroku command:
$ git push heroku master
This is the first error in the console output (see attached text for entire log):
npm ERR! peerinvalid The package dustjs-linkedin does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer makara@0.3.3 wants dustjs-linkedin@~2.0.0
npm ERR! System Linux 3.8.11-ec2
npm ERR! command "/tmp/build_4a748da6-10f7-4221-9c2c-429a7eaf77ac/vendor/node/bin/node" "/tmp/build_4a748da6-10f7-4221-9c2c-429a7eaf77ac/vendor/node/bin/npm" "install" "--userconfig" "/tmp/build_4a748da6-10f7-4221-9c2c-429a7eaf77ac/.npmrc" "--production"
npm ERR! cwd /tmp/build_4a748da6-10f7-4221-9c2c-429a7eaf77ac
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! code EPEERINVALID
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/build_4a748da6-10f7-4221-9c2c-429a7eaf77ac/npm-debug.log
npm ERR! not ok code 0
0 info it worked if it ends with ok
The error seems to be due to the "peerDependencies" configuration in Makara's package.json. It explicitly declares the 2.0.0 release of dustjs-linkedin without any room for wiggle. Heroku's build process is seeing that and failing. When I remove Makara and use the latest release of dustjs-linkedin the Heroku build works fine.
I'm using kraken with makara, and seeing the same. Compilation with grunt-dustjs uses dustjs-linkedin-2.3.x which conflicts with runtime dustjs of 2.0 (required by makara).
My templates are failing with dust error:
TypeError: Object [object Object] has no method '_get'
at body_3 (cache.vm:1:716)
Please update dust dependency to 2.3.x!!!
Is there any reason that the peerDependency can't be changed to use a ^
instead of a ~
and pick up the newer minor versions?
I wouldn't think so. I investigated this back when I submitted it and in going through some of the code and changelogs I didn't see anything breaking b/w 2.0 and 2.3.
Sorry.... that "close" was a mis-click when trying to update my last comment. Apologies.
0.3.4 was just published to solve this per #34.
When deploying a build to heroku, the compile/deploy step fails due to a version conflict between my package.json containing the latest (2.3.x) of dustjs-linkedin and the specified 2.0.0 version in Makara. There is a similar problem with the declared version of dustjs-linkedin in the Adaro package.json.
I'd suggest setting them to use 2.x.x instead of explicit versions and only make it more restrictive if it's found LinkedIn changed the dust signature/API.