Open Garfonso opened 2 years ago
Duplicate of https://github.com/ioBroker/create-adapter/issues/891?
And strongly related to https://github.com/ioBroker/create-adapter/issues/864
Duplicate of #891? And strongly related to #864
Not a duplicate of #891, because this is not on Linux and dev-server fails for a different reason (ok.. Maybe depends on the fix. If there is somehow a general handling of dev-server install failure, this might fix both. So it is related).
And yes, very related to #864. The "right" solution will solve this issue, too.
Right, I overlooked that the other issue is on Windows
On all the Linux systems I did work with, the 'global' node_modules path is global and read only for ordinary users. This is a difference to the windows world, where the 'global' node_modules path today is in the user's home directory (and therefore depends on the user, i.e. 'global' is a bit misleading).
But for that reason during a run of create adapter, the installation of dev-server fails, because it can not be installed globally without the use of
sudo
(or any other means to get administration rights in a system). If dev-server is already installed, the creation will still work as supposed to (but users might be scared by error messages). If it is not installed beforehand, dev-server setup will probably fail (did not test, what happens then).So one mitigation could be to explain in README that for Linux systems the user should install dev-server manually. Not sure if other measures are possible / feasible.
Error messages:
(the error message is a bit cryptic, but from the debug log it seems that npm first wants to rename the existing dev-server in order to copy in the new one and delete the old one - npm version 8.6.0).