[TikiWiki-commits] [Git][tikiwiki/tiki][master] 2 commits: [DOC] package.json add more info on fixing multiple node_modules folders.
Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a296284afb2e_383e2b0647591@gitlab-sidekiq-low-urgency-cpu-bound-v2-5488cfffb7-g2vrh.mail> |
Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
b1fb73f0 by Benoit Grégoire at 2026-06-10T12:52:12+00:00
[DOC] package.json add more info on fixing multiple node_modules folders.
- - - - -
b9db84c0 by Benoit Grégoire at 2026-06-10T12:52:12+00:00
[DOC] templates/header.tpl take one more stab at explaining the practical cases why we need the exception in headerlib if output has already started.
- - - - -
2 changed files:
- package.json
- templates/header.tpl
Changes:
=====================================
package.json
=====================================
@@ -5,13 +5,23 @@
"The short version is that when you update package.json, you have two general choices to get package-lock.json up to date.",
"1- Just run: ",
" npm install",
- " It will update package-lock.json to meet the constraints, but not touch any installed package that already meets the constraints. So it's a minimal impact update",
+ " It will update package-lock.json to meet the constraints, but not touch any installed package that already meets the constraints. So it's a minimal impact update in most cases (minimizes the chance of conflicts)",
"2- Run:",
" npm update",
" This will update ALL packages including transitive dependencies to the latest version that meet the semver in package.json.",
"To regenerate package-lock.json from scratch, run:",
- " rm -r package-lock.json node_modules/;npm install",
- "The above should have the same results as npm update, but that isn't always exactly the case."
+ " rm -r package-lock.json node_modules/ src/js/**/node_modules/;npm install",
+ "The above should have the same results as npm update, but that isn't always exactly the case.",
+ "",
+ "A node about duplicate node_modules (show in git status)",
+ " There should not be any, and must be fixed! This is not a treatise on npm, but look up a concept called module hoisting,",
+ " and know that it must be fixed since tiki has a requirement to run without internet access, and it's local CDN needs predictable file paths to copy files from.",
+ " If there are, duplicate node_modules it usually means that there is a version conflict in the different workspace requirements. The commands:",
+ " npm why name_of_package",
+ " npm find-dupe",
+ " may get you started finding the actual problem.",
+ " In one case, for an unknown reason a non-conflicting package was installed in a duplicate node_module after a simple npm install after a version update (looks like a npm bug).",
+ " It was fixed with a simple npm update"
],
"name" : "tiki",
"version" : "0.0.1",
=====================================
templates/header.tpl
=====================================
@@ -275,6 +275,17 @@
{/if}
{if $headerlib}
+ {* This is wrong (and always has been).
+ For one thing, why would headerlib be or not be there.
+ Second, and more importantly it prevents wikiplugins, block handlers, etc. from adding CSS, requiring workarounds like
+ https://gitlab.com/tikiwiki/tiki/-/merge_requests/10093
+
+ While this pattern may practically work (if not cleanly) in the footer because smarty processing is done by then, it will never work generally here, we cannot time-travel.
+
+ A different solution needs to be implemented if we want both wikiplugins and block handlers to "just work", and headerlib add_css to "just work".
+
+ The simplest solution is probably to add this in SmartyTiki AFTER processing, using DOMDocument. - benoitg - 2026-04-30
+ *}
{$headerlib->output_headers()}
{/if}
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/compare/fbeb14ca5c384e9c3eafb2537704ddfcc44cd412...b9db84c08c0e73e0ca1c457767b50667c99b69a2
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/compare/fbeb14ca5c384e9c3eafb2537704ddfcc44cd412...b9db84c08c0e73e0ca1c457767b50667c99b69a2
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs