Registry / web-framework / avet-build

avet-build

JSON →
library1.4.4jsnpmunverified

avet-build is a build tool for avet, a framework for building server-rendered React applications. This package provides webpack build configurations used in the avet ecosystem. Version 1.4.4 is the latest stable release, with no recent updates since 2018. It is part of the avet monorepo and is designed to work with Node.js >= 8. Key differentiator: integrates with avet's build pipeline, handling webpack bundling for both client and server, and supports features like babel transpilation, static file serving, and environment variable injection. Unlike generic build tools, it is tightly coupled to avet's project structure.

npm install avet-build
INSTALL
IMPORT
SIG · AVET-BUILD
A
avet-build
web-frameworkjavascriptv1.4.4
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.

default (build function)
import build from 'avet-build'
const build = require('avet-build')
The package is an ESM module; default import returns the build function.
default (webpack config)
import buildConfig from 'avet-build/lib/webpack'
const buildConfig = require('avet-build').config
The webpack config is not exported at the top level; access via lib/webpack.
Path utilities
import { resolveApp } from 'avet-build/lib/paths'
import { resolveApp } from 'avet-build'
Path utilities are not exported from the main entry; import from subpath.

Demonstrates programmatic build using avet-build with async/await and error handling.

import build from 'avet-build'; async function start() { try { const result = await build({ cwd: process.cwd(), env: process.env.NODE_ENV || 'production', analyze: false, }); console.log('Build completed:', result); } catch (err) { console.error('Build failed:', err); process.exit(1); } } start();
Debug
Known issues
breakingNODE_ENV must be set to 'production' for optimized builds; otherwise development bundles are emitted
fix
Set process.env.NODE_ENV = 'production' before calling build, or pass env option as 'production'.
affects: >=1.0.0
gotchaavet-build uses webpack 3.x internally; incompatible with webpack 4+ plugins
fix
Do not install webpack 4+ or plugins expecting webpack 4. Use only webpack 3 compatible loaders/plugins.
affects: >=1.0.0
gotchaThe package has not been updated since 2018; may have unpatched security vulnerabilities in transitive dependencies
fix
Consider migrating to a maintained alternative or audit dependencies with npm audit.
affects: >=1.0.0
deprecatedThe build function no longer accepts a callback; must return a promise
fix
Use async/await or .then() instead of callback pattern.
affects: >=1.0.0-18
breakingMinimum Node.js version is 8; Node.js 6 and below are not supported
fix
Update Node.js to >=8 or use a compatible version.
affects: >=1.0.0
gotchaCustom webpack config is merged via webpack-merge; deep merging may produce unexpected results for arrays
fix
Ensure custom config arrays (e.g., plugins, loaders) are concatenated, not overridden.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'webpack'
avet-build requires webpack as a peer dependency but it is not installed
fix
npm install webpack@3 --save-dev
TypeError: build is not a function
Importing the module incorrectly, e.g., using require('avet-build').default without default export
fix
Use import build from 'avet-build'
Error: No configuration found for webpack
avet-build expects a project structure with a 'build' directory or specific config files
fix
Ensure the project has the required avet structure (e.g., build/config/webpack.js)
Module not found: Error: Can't resolve 'babel-loader'
babel-loader is not installed as a dependency
fix
npm install babel-loader@7 --save-dev
Error: The provided value 'NODE_ENV' is not a valid environment
The 'env' option passed to build() is incorrect or missing
fix
Pass e.g., { env: 'production' } or set process.env.NODE_ENV accordingly
Upgrade
Version history
1.4.4latest on npm
Audit
Dependencies
webpackrequiredCore bundler for building the application
babel-loaderoptionalTranspile modern JavaScript and JSX
egg-frameworkoptionalFramework dependency for avet
Agent activity
14 hits · last 30 days
node
10
Amazon
1
OpenAI (training)
1
Resources