Registry / devops / liferay-npm-build-tools-common

liferay-npm-build-tools-common

JSON →
library2.32.2jsnpmunverified

Utility library for Liferay NPM Build Tools, version 2.32.2, maintained by Liferay. It provides shared utilities across Liferay's frontend build toolchain, including npm-scripts, liferay-theme-tasks, and eslint-plugin. It is part of the liferay-frontend-projects monorepo and follows irregular release cadence alongside other packages. Key differentiator: tightly coupled with Liferay portal ecosystem, intended for use within Liferay workspace projects, not a general-purpose npm build tool.

npm install liferay-npm-build-tools-common
INSTALL
IMPORT
SIG · LIFERAY-NPM-BUILD-
L
liferay-npm-build-tools-common
devopsjavascriptv2.32.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

getProjectDependencies
import { getProjectDependencies } from 'liferay-npm-build-tools-common';
const { getProjectDependencies } = require('liferay-npm-build-tools-common');
Package is ESM-only as of v2. No support for CommonJS require().
getProjectDependencies
import { getProjectDependencies } from 'liferay-npm-build-tools-common';
import getProjectDependencies from 'liferay-npm-build-tools-common';
getProjectDependencies is a named export, not a default export.
Project
import { Project } from 'liferay-npm-build-tools-common';
import { Project } from 'liferay-npm-build-tools-common/lib/Project';
No deep import paths exported; all symbols are at package root.
FileUtil
import { FileUtil } from 'liferay-npm-build-tools-common';
FileUtil is a class with static methods; not instantiatable.

Shows how to import the main utilities, create a Project instance, and retrieve its dependencies.

import { getProjectDependencies, Project } from 'liferay-npm-build-tools-common'; // Instantiate a Project instance with the current working directory const project = new Project('/path/to/project'); // Get dependencies of the project const deps = getProjectDependencies(project); console.log(deps); // Array of dependency names
Debug
Known issues
breakingPackage moved from 'liferay-npm-build-tools-common' to 'liferay-npm-build-tools-common' (same name) but internal API may have changed; check v2 migration guide.
fix
Update to v2.0.0 or later and refactor imports to use named exports.
affects: <2.0.0
deprecatedProject constructor expects a rootDir string; if passed undefined, it may throw or return unexpected results.
fix
Always provide a valid directory path to new Project().
affects: >=2.0.0
gotchaPackage does not support CommonJS; using require() will throw Module not found error.
fix
Use import syntax or configure bundler to handle ESM.
affects: >=2.0.0
gotchaFileUtil methods assume a Liferay workspace structure; using outside Liferay context may yield incorrect results.
fix
Only use within a Liferay workspace project.
affects: >=2.0.0
Errors
Common errors & fixes
Error: Cannot find module 'liferay-npm-build-tools-common'
Package not installed or not in node_modules.
fix
Run npm install liferay-npm-build-tools-common --save-dev
SyntaxError: Cannot use import statement outside a module
Using ESM import in a CommonJS context (e.g., Node without type:module).
fix
Add 'type': 'module' to package.json or use .mjs extension.
TypeError: getProjectDependencies is not a function
Incorrect import style (default import instead of named import).
fix
Use import { getProjectDependencies } from 'liferay-npm-build-tools-common'
Upgrade
Version history
2.32.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
liferay-npm-build-tools-common — npm install liferay-npm-build-tools-common · libregistry