Closed ezio-melotti closed 3 years ago
Regarding npm:
I guess updating npm doesn't seem necessary? I feel like it will be ok as long as we keep Ubuntu up-to-date.
Regarding @vue-cli, I didn't need to change anything for the installation, so I guess it isn't necessary.
Possibly unrelated but - I was seeing some issues that looked related to vue-cli-service, but it was actually a memory issue. I increased Docker memory allocation from 2GB to 3GB and that fixed the issue.
* The apt manager gets you the latest version in the Ubuntu appstore by default, not the latest version. * The simoc-web Dockerfile specifies Ubuntu 21.04, which includes Node 7.5.2
I updated this in 3ee66ab020cc90314e96086171cbc6feb4864c3d a couple of months ago.
* In order to update, you first specify a new nodesource, then run the update command. Looks like this would be done in the Dockerfile as part of the command above.
If we do this in the Dockerfile, it will get updated only when we build the image -- which might be good enough.
* In package.json, it appears the best you can do is have it throw an error if not using a specified version of npm. * Regarding having to install it twice, seems intentional - here is an old thread with an explanation.
FTR I tested this and after running bash -r
it picked up the updated npm
. If we install the latest version either in the Dockerfile
or in run.sh
, it shouldn't be a problem since the shell is started aftwerwards.
I guess updating npm doesn't seem necessary? I feel like it will be ok as long as we keep Ubuntu up-to-date.
Agreed, I think we can stick with 7.5.2
for the time being, and keep updating the Ubuntu image.
Currently we install
npm
throughapt-get
in https://github.com/overthesun/simoc-web/blob/bb3b4e6dd20234e59b04c4233e1eab965e711730/Dockerfile#L5-L12This gives us
npm
version7.5.2
. Currently versionnpm@7.24.0
is available, and can be installed withnpm install -g npm@7.24.0
or simplynpm install -g npm@7
(this will install the latest7.*
).This can be done in run.sh.
A few things that need to be figured out:
npm
globally and add it topackage.json
?@vue-cli
(I installed it in a previous PR, but it's not listed directly inpackage.json
)npm
,npm --version
returns7.5.2
, but if I runnpm install -g npm@7
again it seems that the latest version is installednpm
in the Dockerfile instead?