Upgrade from v1.12.2 to v1.13.2 fails because of bootswatch dependency
-
You should not be installing or running NodeBB as root. You should not be running npm as root, that is what is causing your issue.
-
Hey,I ran into this problem as well.
But I can't get it by "run NodeBB as root".What exactly does it mean?
I got it partially fixed by switching package.json to ""bootswatch": "^4.5.0"" instead of github mirror.But it seems that bootswatch skin is no longer available.The error log says that nodeBB requires some ".less" files in bootswatch module.However,version 4.5 bootswatch contains only ".scss" files.
Can someone please tell me how can I fix it? Many thanks. -
@Azurepulse that version of bootswatch is not compatible with nodebb. The error above occurs because you're attempting to run npm as a privileged user "root" or with sudo.
You need to instead install and run nodebb, all git and npm commands, as a regular user.
-
@PitaJ For example,I ran "nodebb setup" as non-root user on CentOS7,and it stopped and said “insufficient privileges”
I tried to install it both on Windows and CentOs.I never ran node command as an Administrator on Windows,but still can't do.
Is there any way I can install a ".less" version of bootswatch manually?
Also,should it failed,it has nothing to do with Theme plugins right? -
I have no idea why you wouldn't have access to run node as a different user. How did you install node?
You either have to do everything as root/sudo or nothing.
What issues are you having on Windows? What guides are you using for installation?
-
@PitaJ I installed node as sudo. So I had to install everything as a non-sudo user,including mongodb/node right?
Exactly same issue on windows.I simply ran "nodebb setup",not as an Administrator,then it got stucked.The error log says it couldn't fetch bootswatch git mirror because of invalid arguments. -
Installing node, mongo, and nginx as sudo should be fine, sorry for the confusing implication. But when you install NodeBB, you should be cloning it into an unprivileged directory, running git with an unprivileged user, and running all
./nodebb
commands as an unprivileged user as well.Please provide the exact error that you see when installing on windows.
-
Here's the complete error log occurs on Windows.
Screenshots:
![CM~8(9CYHD8TWW@]F~36]U8.png](https://i.imgur.com/ccs4Yq0.png)
![CM~8(9CYHD8TWW@]F~36]U8.png](https://i.imgur.com/TsXwusY.png)
Log text:
Dependencies outdated or not yet installed.
Installing them now...npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of iss
ues. Please, upgrade your dependencies to the actual version of core-js@3.
npm ERR! code 128
npm ERR! Command failed: git clone --mirror -q git://github.com/thomaspark/bootswatch.git C:\Users\huawei\AppData\Roaming\npm
-cache_cacache\tmp\git-clone-3825054a.git --config core.longpaths=true
npm ERR! warning: templates not found in C:\Users\huawei\AppData\Local\Temp\pacote-git-template-tmp\git-clone-fd3314bb
npm ERR! fatal: read error: Invalid argument
npm ERR! fatal: early EOF
npm ERR! fatal: index-pack failed
npm ERR!npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\huawei\AppData\Roaming\npm-cache_logs\2020-06-13T03_49_30_961Z-debug.log
Error installing dependencies!
message: Command failed: npm install --production
stdout: null
stderr: null
D:\Coding\Web_Project\NodeBB-v1.14.x\src\cli\package-install.js:72
throw e;
^Error: Command failed: npm install --production
at checkExecSyncError (child_process.js:630:11)
at Object.execSync (child_process.js:666:15)
at Object.installAll (D:\Coding\Web_Project\NodeBB-v1.14.x\src\cli\package-install.js:63:9)
at Object.<anonymous> (D:\Coding\Web_Project\NodeBB-v1.14.x\src\cli\index.js:60:18)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 552,
stdout: null,
stderr: null
}I suppose I can just forbid users from changing skins to bypass this error.