{"id":18590,"library":"namespace-bundler","title":"namespace-bundler","description":"A JavaScript bundler (v1.0.7, last updated 2017) that concatenates files following namespace patterns without requiring import/require statements. Designed for legacy browser support including IE8, it produces readable output in dev tools. Simple API with bundle() returning content and writeToFile() for synchronous output. No active development since 2017.","status":"abandoned","version":"1.0.7","language":"javascript","source_language":"en","source_url":"https://github.com/dstuessy/namespace-bundler","tags":["javascript"],"install":[{"cmd":"npm install namespace-bundler","lang":"bash","label":"npm"},{"cmd":"yarn add namespace-bundler","lang":"bash","label":"yarn"},{"cmd":"pnpm add namespace-bundler","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package uses CommonJS; no ESM exports.","wrong":"import Bundler from 'namespace-bundler'","symbol":"default","correct":"const Bundler = require('namespace-bundler')"},{"note":"bundle is a method on the default export, not a named export.","wrong":"const { bundle } = require('namespace-bundler')","symbol":"bundle","correct":"const Bundler = require('namespace-bundler'); Bundler.bundle('/path')"},{"note":"value is a property of the returned object, not a direct export.","wrong":"const { value } = require('namespace-bundler').bundle('/path')","symbol":"value","correct":"const result = require('namespace-bundler').bundle('/path'); result.value"}],"quickstart":{"code":"const Bundler = require('namespace-bundler');\nconst result = Bundler.bundle('/path/to/src');\nconsole.log(result.value);\nresult.writeToFile('/path/to/output.js');","lang":"javascript","description":"Shows basic usage: bundle a directory and get content or write to file."},"warnings":[{"fix":"Ensure files use namespace pattern (e.g., window.MyApp = window.MyApp || {};) for dependency order.","message":"No import/require in source files: the bundler relies on namespace pattern ordering.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use value property and write asynchronously with fs.writeFile if needed.","message":"writeToFile is synchronous; may block event loop for large projects.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Migrate to an actively maintained bundler.","message":"No updates since 2017; consider modern bundlers like webpack or esbuild.","severity":"deprecated","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install --save-dev namespace-bundler","cause":"Package not installed.","error":"Error: Cannot find module 'namespace-bundler'"},{"fix":"Use const Bundler = require('namespace-bundler');","cause":"Wrong import style (ESM import used).","error":"TypeError: Bundler.bundle is not a function"},{"fix":"Ensure the path is absolute and contains JavaScript files.","cause":"bundle() called with invalid path or empty directory.","error":"Cannot read property 'value' of undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}