{"id":25612,"library":"future-node","title":"future-node","description":"A Node.js require hook that allows modules to specify their own transpilers via package.json configuration, inspired by browserify transform system. Version 0.0.2 is in early development with no specific release cadence. It replaces Node's built-in extension hooks with a flexible transpiler pipeline, enabling per-file transpilation options. Bundled with an ES2016 transpiler for convenience. Unlike babel-register or ts-node, it decouples transpiler selection from the main application, letting dependencies declare their own transforms. Lacks active maintenance and usage is minimal.","status":"abandoned","version":"0.0.2","language":"javascript","source_language":"en","source_url":"git://github.com/jkroso/future-node","tags":["javascript","require hook","babel","transpile","node"],"install":[{"cmd":"npm install future-node","lang":"bash","label":"npm"},{"cmd":"yarn add future-node","lang":"bash","label":"yarn"},{"cmd":"pnpm add future-node","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This is a side-effect module that must be required before any modules you want to transpile. CJS only, no ESM support.","wrong":"import 'future-node'","symbol":"future-node","correct":"require('future-node')"},{"note":"CLI command installed globally or via npx. Do not use npm run if not in scripts.","wrong":"npm run future-node my-app","symbol":"CLI","correct":"npx future-node my-app"},{"note":"Config must be an array of arrays, not an object. Each entry: [pattern, module, options?].","wrong":"{\"transpile\":{\"*.js\":\"babel\"}}","symbol":"transpile config in package.json","correct":"{\"transpile\":[[\"*.js\",\"!sourcegraph/babel->js\",{\"stage\":0}]]}"}],"quickstart":{"code":"// Install: npm install future-node\n// Create app.js\nrequire('future-node');\nconst fn = () => 'Hello from future-node!';\nconsole.log(fn());\n\n// In package.json, enable transpilation:\n{\n  \"transpile\": [\n    [\"*.js\", \"!sourcegraph/babel->js\", {\"stage\": 0}]\n  ]\n}\n\n// Run: node app.js","lang":"javascript","description":"Shows minimal usage: require the hook, then run any JS file; transpile configuration optional."},"warnings":[{"fix":"Use babel-register or esm for Node transpilation instead.","message":"Package is effectively abandoned since 2016. No updates, no support for modern Node versions (>=12).","severity":"deprecated","affected_versions":">=0.0.2"},{"fix":"Use standard babel-preset-env with babel-register for predictable behavior.","message":"The bundled ES2016 transpiler '!sourcegraph/babel->js' expects a non-standard syntax derived from Sourcegraph browser build tooling.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use patterns like '*.js' not 'src/**/*.js'.","message":"Transpile patterns are glob-like but not standard globs; they match file extensions only, not full paths.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install future-node' in project root.","cause":"Module not installed or not in node_modules.","error":"Error: Cannot find module 'future-node'"},{"fix":"Use 'require('future-node')' as a bare require, no assignment.","cause":"Attempt to import or assign require('future-node') to variable; it modifies require.extensions, does not export anything.","error":"TypeError: future_node is not a function"},{"fix":"Add transpile entry for '*.js' with a babel transform that handles ES module syntax.","cause":"transpile config missing for .js files with ES modules; Node does not support import natively.","error":"SyntaxError: Unexpected token import"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}