clojurescript 2025-03-28

shadow-cljs is compiled output is written to "functions/index.js", which is the generated JavaScript file. but after upgrading the firebase-functios to latest getting below issue. The required dependency xregexp is already there in package.json ---- Error: Cannot find module 'xregexp' Require stack: - /home/circleci/numbered-headings/functions/index.js - /home/circleci/numbered-headings/node_modules/firebase-functions/lib/runtime/loader.js - /home/circleci/numbered-headings/node_modules/firebase-functions/lib/bin/firebase-functions.js at Function._resolveFilename (node:internal/modules/cjs/loader:1225:15) at Function._load (node:internal/modules/cjs/loader:1055:27) at TracingChannel.traceSync (node:diagnostics_channel:322:14) at wrapModuleLoad (node:internal/modules/cjs/loader:220:24) at Module.require (node:internal/modules/cjs/loader:1311:12) at require (node:internal/modules/helpers:136:16) at /home/circleci/numbered-headings/functions/index.js:1124:350 at /home/circleci/numbered-headings/functions/index.js:6:22 at Object. (/home/circleci/numbered-headings/functions/index.js:10:3) at Module._compile (node:internal/modules/cjs/loader:1554:14) { code: 'MODULE_NOT_FOUND', requireStack: [ '/home/circleci/numbered-headings/functions/index.js', '/home/circleci/numbered-headings/node_modules/firebase-functions/lib/runtime/loader.js', '/home/circleci/numbered-headings/node_modules/firebase-functions/lib/bin/firebase-functions.js' ] }

is functions also the basedir where the process is launched from? if your project root is the basedir and you launch it as ./functions/index.js it might not properly recognize <project>/functions/node_modules and instead look in <project>/node_modules

the issue is resolved.. thanks for helping!

Is it also in node_modules?