-
I'm really puzzled by this one. I've been using gulp to build fomantic for several weeks now, but it stopped working for me all of a sudden, without me realizing that I have changed anything in the setup. (No, I am not saying dark forces are involved, but I just don't know what could have caused this :) npx gulp build ✔
Error: Cannot find module 'better-console'
Require stack:
- /Users/ttasovac/Development/ttasovac/raskovnik-frontend/semantic/tasks/watch.js
- /Users/ttasovac/Development/ttasovac/raskovnik-frontend/semantic/tasks/rtl/watch.js
- /Users/ttasovac/Development/ttasovac/raskovnik-frontend/semantic/tasks/collections/rtl.js
- /Users/ttasovac/Development/ttasovac/raskovnik-frontend/semantic/gulpfile.js
- /Users/ttasovac/Development/ttasovac/raskovnik-frontend/node_modules/gulp-cli/lib/shared/require-or-import.js
- /Users/ttasovac/Development/ttasovac/raskovnik-frontend/node_modules/gulp-cli/lib/versioned/^5.0.0/index.js
- /Users/ttasovac/Development/ttasovac/raskovnik-frontend/node_modules/gulp-cli/index.js
- /Users/ttasovac/Development/ttasovac/raskovnik-frontend/node_modules/gulp/bin/gulp.js
at Function._resolveFilename (node:internal/modules/cjs/loader:1405:15)
at defaultResolveImpl (node:internal/modules/cjs/loader:1061:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1066:22)
at Function._load (node:internal/modules/cjs/loader:1215:37)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
at Module.require (node:internal/modules/cjs/loader:1491:12)
at require (node:internal/modules/helpers:135:16)
at Object.<anonymous> (/Users/ttasovac/Development/ttasovac/raskovnik-frontend/semantic/tasks/watch.js:7:18)
at Module._compile (node:internal/modules/cjs/loader:1734:14) {
code: 'MODULE_NOT_FOUND', This doesn't make sense because the supposed missing module My package.json looks like this: {
"private": true,
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production"
},
"devDependencies": {
"axios": "^1.8.1",
"bootstrap": "^5.3.3",
"cross-env": "^5.2.1",
"fomantic-ui": "^2.9.3",
"gulp": "^5.0.0",
"gulp-hash-src": "^0.1.6",
"gulp-sourcemaps": "^3.0.0",
"jquery": "^3.7.1",
"jquery-address": "^1.6.0",
"laravel-mix": "^6.0.49",
"laravel-mix-purgecss": "^6.0.0",
"less": "^4.2.2",
"less-loader": "^12.2.0",
"lodash": "^4.17.13",
"popper.js": "^1.12",
"resolve-url-loader": "^5.0.0",
"vue": "^3.5.13",
"webpack": "^5.98.0"
}
} and my package-lock.json looks like this. I'll be really grateful for any tips. I'm working on resurrecting an old project that used Semantic UI and am so happy to see that in the meantime Fomantic has taken over the mantle! Many thanks to @lubber-de for his great work. All best, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
better-console, according to your package json is not declared as dependency package. |
Beta Was this translation helpful? Give feedback.
better-console, according to your package json is not declared as dependency package.
Fomantic UI uses a fork of better-console instead, so the original better-console is not included via fui.
You may check your custom gulp tasks for
require "better-console"
and change that byrequire "@fomantic/better-console"
instead (and run npm install again)