Registry /
devops / liferay-npm-bundler-preset-isomorphic
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
preset config
✓ {
"preset": "liferay-npm-bundler-preset-isomorphic"
}
✗ import LiferayIsomorphicPreset from 'liferay-npm-bundler-preset-isomorphic'
This package is a configuration preset, not a JavaScript module. Its 'usage' is by referencing its name within the `preset` field of your project's `.npmbundlerrc` file. It does not export any symbols for direct `import` or `require`.
configuration reference
✓ // Add to .npmbundlerrc: {
// "preset": "liferay-npm-bundler-preset-isomorphic"
// }
✗ const isomorphicConfig = require('liferay-npm-bundler-preset-isomorphic');
It is a common mistake to attempt to import or require bundler presets as if they were runtime libraries. This package serves as a declarative configuration for the `liferay-npm-bundler` and has no programmatic API.
no direct code usage
✓ // This package is used exclusively via .npmbundlerrc configuration.
✗ import { IsomorphicPreset } from 'liferay-npm-bundler-preset-isomorphic';
Developers should consult the Liferay npm Bundler documentation for how to configure and extend presets, rather than looking for JavaScript exports from this package.
Demonstrates how to install the preset and configure it in the `.npmbundlerrc` file for use with `liferay-npm-bundler`.
npm install --save-dev liferay-npm-bundler-preset-isomorphic
// Create or update your .npmbundlerrc file in your project root:
// .npmbundlerrc
{
"preset": "liferay-npm-bundler-preset-isomorphic"
}
// Then run the liferay-npm-bundler as part of your build process (e.g., in package.json scripts):
// package.json
// {
// "scripts": {
// "build": "liferay-npm-bundler"
// }
// }
liferay-npm-bundler --version
Debug
Known issues
breakingThe `liferay-npm-bundler` tool, which this preset configures, is officially deprecated as of Liferay 2024.Q4/Portal GA129 and is slated for future removal. Liferay's recommended approach is to transition to standard JavaScript build tools like `esbuild` to manage module bundling.fixPlan and execute a migration of your build process away from `liferay-npm-bundler` and its associated presets to standard tooling (e.g., `esbuild`, Webpack).
affects: >=1.0.0 (when used with Liferay DXP/Portal GA129+ or newer)
breakingOlder versions of `liferay-npm-bundler` (prior to 2.32.1) could encounter `ENOENT` errors during the build process due to unexpected breaking changes in transitive dependencies like `globby`.fixUpdate your `liferay-npm-bundler` dependency to version `2.32.1` or newer to ensure compatibility and resolve transitive dependency issues.
affects: All versions of `liferay-npm-bundler-preset-isomorphic` when used with `liferay-npm-bundler <2.32.1`
gotchaThe `liferay-npm-bundler-plugin-replace-browser-modules` (a plugin utilized by this preset) changed its default `resolve.aliasFields` behavior. It previously scanned `unpkg` and `jsdelivr` fields in `package.json`, which caused problems and is no longer supported. The default now strictly uses `['browser']`. Custom configurations or `package.json` entries relying on `unpkg` or `jsdelivr` for aliasing may cease to function as expected.fixEnsure your `package.json` uses the `browser` field for aliasing isomorphic modules and migrate away from relying on `unpkg` or `jsdelivr` fields for this specific purpose.
affects: Check `liferay-npm-bundler-plugin-replace-browser-modules` versions bundled within or used directly.
Errors
Common errors & fixes
Error: ENOENT: no such file or directory, open '...'
This error during `liferay-npm-bundler` execution often indicates a file path resolution issue, commonly stemming from an incompatibility with updated transitive dependencies (e.g., `globby`) in older `liferay-npm-bundler` versions.
fixUpgrade your `liferay-npm-bundler` dependency to version `2.32.1` or higher to resolve known `globby` compatibility problems.
node:internal/fs/utils:344 throw err; ^ Error: ENOENT: no such file or directory, open '/var/jenkins_home/workspace/.../node_modules/lodash@4.17.21/minBy.js'
This specific stack trace is a known manifestation of the `globby` transitive dependency issue affecting `liferay-npm-bundler` versions older than `2.32.1`, leading to incorrect file path lookups.
fixUpdate `liferay-npm-bundler` to version `2.32.1` or a newer version to fix the underlying dependency incompatibility.
Audit
Dependencies
liferay-npm-bundlerrequiredThis package is a configuration preset for liferay-npm-bundler and requires it to function. Note that liferay-npm-bundler itself is deprecated.
babel-preset-liferay-isomorphicrequiredIncluded by this preset for Babel transformations required for isomorphic code.
liferay-npm-bundler-plugin-replace-browser-modulesrequiredIncluded by this preset to handle browser-specific module replacements and aliasing.