push2cloud-compiler
raw JSON → 2.0.4 verified Fri May 01 auth: no javascript maintenance
Compiler for push2cloud manifests, version 2.0.4. It validates and transforms deployment manifest files for the push2cloud deployment system. Part of the larger push2cloud project, it handles manifest compilation with schema validation. No significant updates since 2016; project appears stale or in maintenance mode. Alternative: custom script or npm-deploy.
Common errors
error TypeError: compile is not a function ↓
cause Using default import when package exports named functions.
fix
Change to named import: import { compile } from 'push2cloud-compiler'
error Error: Cannot find module 'lodash' ↓
cause Missing or mismatched dependency lodash.
fix
Ensure lodash is installed: npm install lodash
Warnings
deprecated Package is part of push2cloud project which is no longer actively maintained. ↓
fix Consider migrating to alternative deployment tools like Kubernetes or Docker Compose.
breaking Node.js >=4.2.0 required, but modern Node versions may have breaking changes due to outdated dependencies. ↓
fix Use Node 10 or lower, or update package dependencies manually.
gotcha Default import does not exist; using 'import compile from ...' will result in undefined. ↓
fix Use named import: import { compile } from 'push2cloud-compiler'
Install
npm install push2cloud-compiler yarn add push2cloud-compiler pnpm add push2cloud-compiler Imports
- default wrong
const compile = require('push2cloud-compiler')correctimport compile from 'push2cloud-compiler' - compile wrong
const compile = require('push2cloud-compiler').compilecorrectimport { compile } from 'push2cloud-compiler' - validate
import { validate } from 'push2cloud-compiler'
Quickstart
import { compile, validate } from 'push2cloud-compiler';
const manifest = {
apps: [{
name: 'test-app',
dockerImage: 'node:14'
}]
};
try {
const valid = validate(manifest);
if (valid) {
const compiled = compile(manifest);
console.log('Compiled:', compiled);
}
} catch (err) {
console.error('Error:', err.message);
}