I’m having trouble upgrading AdminLTE and could use some guidance.
Currently my project uses AdminLTE version 2.3.11 but I want to update to version 3.0.5 since it appears to be the most recent stable release without major breaking changes.
My environment setup:
Node.js: v20.15.0
npm: 10.8.1
jspm: 0.16.55
Issue with jspm installation:
When I try to install using jspm, I get this dependency conflict:
>jspm install npm:[email protected]
err Installing npm:[email protected], no version match for npm:jquery@^4
warn Installation changes not saved.
Issue with npm installation:
Using npm gives me EBUSY errors during cleanup:
>npm install [email protected]
npm warn cleanup Failed to remove some directories [
npm warn cleanup [
npm warn cleanup 'C:\MyProject\node_modules\utility-package',
npm warn cleanup [Error: EBUSY: resource busy or locked, rmdir 'C:\MyProject\node_modules\utility-package'] {
npm warn cleanup errno: -4082,
npm warn cleanup code: 'EBUSY',
npm warn cleanup syscall: 'rmdir'
npm warn cleanup }
npm warn cleanup ]
npm warn cleanup ]
npm error command failed
npm error command C:\Windows\system32\cmd.exe /d /s /c husky install
npm error 'husky' is not recognized as an internal or external command
I’ve tried the same process on different machines but get identical results. Has anyone encountered similar issues when upgrading AdminLTE or know what might be causing these conflicts?
That EBUSY error usually happens because Windows locks files - especially if your antivirus is scanning node_modules while you’re installing. Try turning off real-time protection temporarily or exclude your project folder from scans. For the jspm problem, AdminLTE 3.0.5 needs jQuery 3.x but some dependencies want jQuery 4.x - that’s your conflict right there. I hit the same issues when upgrading and switching to Yarn fixed the file locking mess. You can also try running command prompt as admin to get around EBUSY errors. The husky error means your package.json has postinstall scripts that don’t play nice with your setup - just remove those hooks temporarily while you upgrade.
Upgrading AdminLTE can present issues due to jQuery version conflicts. It seems that DataTables requires a newer version of jQuery than what AdminLTE 3.0.5 supports. Additionally, the EBUSY error you’re encountering typically indicates that some files in your node_modules directory are being used by another process. A common fix is to execute npm cache clean --force, then delete your node_modules folder and package-lock.json file before reinstalling. If you’re using an older version of jspm, consider updating to a more recent one, as improved package resolution can mitigate such issues. As a temporary measure, you might want to manually download the dist files of AdminLTE and manage the dependencies manually until you’ve resolved the package manager problems.
sounds like version conflicts and file locks are killing you. had the same nightmare upgrading to adminlte 2.x. skip the package managers entirely - grab the css/js files straight from their github releases and dump them in your assets folder. way cleaner than fighting npm dependency hell.