{"id":20460,"library":"prettier-standalone","title":"prettier-standalone","description":"Standalone browser build of Prettier, an opinionated code formatter. Version 1.3.1-0 (archived, replaced by prettier's built-in standalone bundles). This package is a legacy wrapper that allowed using Prettier in browser environments before Prettier officially shipped standalone UMD/ESM builds. It aggregates all Prettier language parsers into a single browser-compatible bundle. The official Prettier package now includes its own standalone builds (e.g., 'standalone.js', 'parser-*.js') in the 'prettier' npm package, making this package obsolete. No longer maintained; users should switch to the official 'prettier' package and its standalone modules.","status":"deprecated","version":"1.3.1-0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install prettier-standalone","lang":"bash","label":"npm"},{"cmd":"yarn add prettier-standalone","lang":"bash","label":"yarn"},{"cmd":"pnpm add prettier-standalone","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The official Prettier provides standalone builds under 'prettier/standalone'. This package is obsolete.","wrong":"import prettier from 'prettier-standalone'","symbol":"prettier","correct":"import prettier from 'prettier/standalone'"},{"note":"Parser names changed in later Prettier versions; use current Prettier documentation.","wrong":"const result = prettier.format(code, { parser: 'babylon' })","symbol":"format","correct":"const result = await prettier.format(code, { parser: 'babel' })"},{"note":"prettier.check is async in standalone builds.","wrong":"prettier.checkSync(code, { parser: 'babel' })","symbol":"check","correct":"const isFormatted = await prettier.check(code, { parser: 'babel' })"}],"quickstart":{"code":"// Install: npm install prettier\n// Use in browser via script tag (ES modules):\nimport prettier from 'https://unpkg.com/prettier@2.8.8/standalone.mjs';\nimport parserBabel from 'https://unpkg.com/prettier@2.8.8/parser-babel.mjs';\n\nconst code = 'const x = 1';\nprettier.format(code, {\n  parser: 'babel',\n  plugins: [parserBabel]\n}).then(result => console.log(result));\n// Output: \"const x = 1;\"\n","lang":"javascript","description":"Demonstrates using official prettier standalone in browser with ES module imports from CDN."},"warnings":[{"fix":"Replace import 'prettier-standalone' with 'prettier/standalone' and install 'prettier' instead.","message":"prettier-standalone is deprecated; use official prettier package standalone builds.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Migrate to prettier@latest and use the official standalone builds.","message":"Version 1.x is extremely outdated and incompatible with modern Prettier APIs and parsers.","severity":"breaking","affected_versions":"1.x"},{"fix":"With official Prettier, import and register parsers via 'plugins' option.","message":"This package bundles all parsers in one file; official standalone requires explicit parser imports.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Switch to actively maintained 'prettier' package.","message":"Package has not been updated since Prettier 1.3.1 and may have security vulnerabilities.","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":"Install 'prettier' instead: npm install prettier","cause":"The package is obsoleted and not installed; users often mistakenly install the wrong package.","error":"Cannot find module 'prettier-standalone'"},{"fix":"Use ES module import from official standalone: import prettier from 'prettier/standalone'","cause":"Using CommonJS require of 'prettier-standalone' in browser without bundler.","error":"prettier.format is not a function"},{"fix":"Import parser modules and pass them in the plugins array: plugins: [parserBabel]","cause":"In official standalone, parsers must be passed as plugins; this package's monolithic bundle made them global.","error":"Uncaught TypeError: Cannot read properties of undefined (reading 'parsers')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}