rdesign/frontend/node_modules/detect-node-es
Jeff Emmett 80f1e96e6b Fix frontend build: type errors, SDK handling, docker context
- Use jq to cleanly remove encryptid SDK from package.json in Docker
- Fix TypeScript strict mode errors in dashboard and assistant
- Add .dockerignore to exclude node_modules from build context
- Use project root as Docker build context for frontend
- Fix Traefik routing: separate frontend/api/studio paths

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 02:21:52 +00:00
..
es5 Fix frontend build: type errors, SDK handling, docker context 2026-03-24 02:21:52 +00:00
esm Fix frontend build: type errors, SDK handling, docker context 2026-03-24 02:21:52 +00:00
LICENSE Fix frontend build: type errors, SDK handling, docker context 2026-03-24 02:21:52 +00:00
Readme.md Fix frontend build: type errors, SDK handling, docker context 2026-03-24 02:21:52 +00:00
package.json Fix frontend build: type errors, SDK handling, docker context 2026-03-24 02:21:52 +00:00

Readme.md

detect-node

This is a fork of detect-node.

Differences:

  • uses named export {isNode}
  • has d.ts integrated
  • supports ESM

Install

npm install --save detect-node-es

Usage:

-var isNode = require('detect-node');
+var {isNode} = require('detect-node-es');

if (isNode) {
  console.log("Running under Node.JS");
} else {
  alert("Hello from browser (or whatever not-a-node env)");
}

The check is performed as:

module.exports = false;

// Only Node.JS has a process variable that is of [[Class]] process
try {
 module.exports = Object.prototype.toString.call(global.process) === '[object process]' 
} catch(e) {}

Thanks to Ingvar Stepanyan for the initial idea. This check is both the most reliable I could find and it does not use process env directly, which would cause browserify to include it into the build.