{"id":26504,"library":"transquire","title":"transquire","description":"A require replacement and hook to automatically transpiler module source at runtime. Current stable version 0.0.1. This package provides a mechanism to automatically transpile ES6 or other source code during require() calls by replacing or hooking Node.js's module loading. It is designed for development or sandboxed environments where pre-compilation is not desired. Differentiates from Babel/register by being a more generic hook for transpilers. No active development since 2015.","status":"abandoned","version":"0.0.1","language":"javascript","source_language":"en","source_url":"git@github.com:CrabDude/transquire","tags":["javascript","transpile","es6","require","hook"],"install":[{"cmd":"npm install transquire","lang":"bash","label":"npm"},{"cmd":"yarn add transquire","lang":"bash","label":"yarn"},{"cmd":"pnpm add transquire","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default export, works with both ESM and CJS, but package is outdated and not recommended for new projects.","wrong":"const transquire = require('transquire')","symbol":"transquire","correct":"import transquire from 'transquire'"}],"quickstart":{"code":"// Install: npm install transquire\n// Then in your code (ESM or CJS):\nimport transquire from 'transquire';\n// Replace require with transpiling version\nconst originalRequire = require;\nrequire = transquire(require, {\n  // transpiler options\n  // e.g., for ES6\n  extensions: ['.es6', '.js'],\n  transform: (code, filename) => {\n    // use babel or other transpiler\n    return code;\n  }\n});\n// Now require will handle transpilation\nconst module = require('./some.es6');","lang":"javascript","description":"Shows how to replace require with a transpiling version using transquire."},"warnings":[{"fix":"Use modern alternatives like @babel/register or ts-node for TypeScript.","message":"Package is abandoned (last publish 9+ years ago). Not recommended for use in new projects.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Write custom type declarations if needed, but consider alternative packages.","message":"No TypeScript definitions available; usage in TypeScript projects is unsupported.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install transquire' with the correct registry.","cause":"Package not installed or missing from node_modules.","error":"Cannot find module 'transquire'"},{"fix":"Ensure you imported with 'import transquire from 'transquire'' or use 'const transquire = require('transquire').default'.","cause":"Import style mismatch; using default import when not configured.","error":"transquire is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}