Registry / devops / jsx-to-ss

jsx-to-ss

JSON →
library1.3.1jsnpmunverified

A Babel-based transpiler that converts JSX syntax into NetSuite SuiteScript 2.0 API calls for building Suitelet UIs. Current stable version is 1.3.1 (last updated 2022). It enables component-based UI development similar to React, reducing verbosity by automatically generating variable names and IDs. Key differentiator: eliminates manual SuiteScript UI boilerplate. Currently in active development on GitHub with limited community adoption. Requires Babel and Node.js.

npm install jsx-to-ss
INSTALL
IMPORT
SIG · JSX-TO-SS
J
jsx-to-ss
devopsjavascriptv1.3.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

JSSX (CLI)
npx jssx <file>.jsx
jssx <file>.jsx (without npx if globally not installed)
Run as CLI command after installing globally or via npx.
Transpile API (programmatic)
import { transpile } from 'jsx-to-ss';
const transpile = require('jsx-to-ss').transpile;
Package is ESM only; CommonJS require will fail. Check documentation for exact API.
JSX Components (Conceptual)
// Write JSX in .jsx files <Form title='Test'><Field label='Name'/></Form>
Using lowercase component names like <form> instead of <Form>
Component names must be PascalCase to match SuiteScript API. IDs are auto-generated.

Transpiles a JSX file containing Suitelet UI components into NetSuite SuiteScript 2.0 API calls.

// Install globally: npm install -g jsx-to-ss // Create input.jsx with JSSX: // <Form title="Customer Form" fileId="654321"> // <Sublist markAll label="item history"> // <Field label="Entity" type="text" /> // <Field label="Subsidiary" type="text" /> // <Field label="Name" type="text" /> // <Field label="Currency" type="number" /> // </Sublist> // <Button label="Clear Button" /> // </Form> // Transpile: jssx input.jsx // Output in input.jsx appended as SuiteScript code:
Debug
Known issues
gotchaIDs are auto-generated based on labels; if you change labels, IDs change, breaking references.
fix
Use explicit id properties to stabilize IDs: id="custpage_my_field".
affects: >=1.0.0
breakingPackage is ESM-only; require() throws error.
fix
Use import syntax or upgrade Node to support ESM.
affects: >=1.0.0
deprecatedComponent names must exactly match SuiteScript API; old aliases from v0.x are removed.
fix
Use PascalCase names as per documentation (e.g., Form, Field, Sublist).
affects: <1.0.0
gotchaAll UI components must be children of a root <Form> component; nesting outside fails.
fix
Wrap all components in a single <Form> element.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'jsx-to-ss'
Module not installed either globally or locally.
fix
npm install -g jsx-to-ss (for CLI) or npm install jsx-to-ss (for programmatic use).
jssx is not recognized as an internal or external command
Global npm package not installed or not in PATH.
fix
Run 'npm install -g jsx-to-ss' and ensure global npm bin is in PATH, or use 'npx jssx'.
Error: ‘require’ of ES Module not supported
Package is ESM-only; using require() instead of import.
fix
Use import syntax or add 'type':'module' to package.json.
Upgrade
Version history
1.3.1latest on npm
Audit
Dependencies
@babel/corerequiredRequired for JSX parsing and transpilation
@babel/preset-reactrequiredPreset for JSX transformation
Agent activity
5 hits · last 30 days
node
4
Resources
jsx-to-ss — npm install jsx-to-ss · libregistry