Closed mrquincle closed 3 years ago
Is this with the version that is currently in master?
Yes, and it wasn't the case yesterday.
And we're not the only one: https://github.com/strongloop/strong-mesh-client/issues/53
Locally I'm using nvm
to reproduce the same problem.
nvm install 6.6.0
nvm use 6.6.0
npm install -g strongloop
The dependencies it complains about: js-beautify
, nodent
, regenerator
. All accidentally in ajv
, but only in devDependencies which don't seem to come through if used as part of package.json.
Feel free to reproduce by this simple package.json file:
{
"name": "Test",
"version": "1.1.0",
"main": "server/server.js",
"license": "(LGPL-3.0 OR Apache-2.0 OR MIT)",
"dependencies": {
"strong-mesh-client": "*"
},
"devDependencies": {
},
"repository": {
"type": "",
"url": ""
},
"description": "Crownstone",
"engines": {
"node": "6.6.0"
}
}
I still haven't found the right tool to quickly get the dependencies out. npm ls
shows only local dependencies. How do I quickly trace why strong-mesh-client is included in the first place?
It is included because in the heroku settings it is listed as a build package. That triggers an npm install -g strongloop which i find really scary since any update to strongloop would be automatically included.
By the way, this is why we would like to use yarn. Exactly to avoid this.
Do we actually use any strongloop functionality? Maybe loopback will be sufficient. Currently the build is failing (https://github.com/strongloop/strong-mesh-client/issues/53) because of some dependencies on strong-mesh-client, namely js-beautify, nodent, and regenerator that are pulled in through ajv.
If we e.g. only want the cluster and restart functionality it should be enough to add strong-supervisor as a dep (http://stackoverflow.com/questions/32150014/how-to-use-strongloop-pm-on-heroku-for-loopback-based-nodejs-applications) and remove the buildpack at https://dashboard.heroku.com/apps/crownstone-cloud/settings, and have web: ./node_modules/.bin/sl-run server/server.js
rather than web: slc run
in Procfile
.
I haven't done it yet, because I assume removing the buildpack will apply to both development and production.
I tend to agree, though I'm not that up to speed with the cloud processes. I'd prefer everything we use to be in package.json to avoid things like this.
Given that everything runs locally without the strongloop cli I don't think its mission critical.
The buildpack is individually configured per heroku app, dev and production are different apps (in different groups).
Okay, done for development. Deployment is now much faster. :-)
Cool :) we'll need to see what exactly is missing now. It could be that the packages that are running on production require it still.
There is some dependency problem in
strong-mesh-client
.