@akylas/nativescript-vue-template-compiler
raw JSON → 2.1.14 verified Fri May 01 auth: no javascript
Template compiler for NativeScript-Vue applications, auto-generated from the Akylas fork. Version 2.1.14 is the latest stable. This package transforms Vue templates into render functions for NativeScript, enabling native mobile UI components. Unlike the core `nativescript-vue` compiler, this fork may include Akylas-specific patches and tweaks. Release cadence is tied to the Akylas fork of NativeScript-Vue. Typically used as a build-time dependency via webpack or other bundlers.
Common errors
error Error: Cannot find module '@akylas/nativescript-vue-template-compiler' ↓
cause Package not installed or wrong scoped name used.
fix
Run: npm install @akylas/nativescript-vue-template-compiler
error Error [ERR_REQUIRE_ESM]: require() of ES Module not supported ↓
cause Attempting to require an ESM version, but this package is CJS.
fix
Use require() as shown in the quickstart.
error Cannot find module 'nativescript-vue' ↓
cause nativescript-vue peer dependency not installed.
fix
Run: npm install nativescript-vue
Warnings
gotcha Package name is scoped @akylas, not akylas-nativescript-vue-template-compiler as the npm name suggests. Use npm install @akylas/nativescript-vue-template-compiler. ↓
fix Use require('@akylas/nativescript-vue-template-compiler') or import from @akylas/nativescript-vue-template-compiler.
gotcha This is a CJS-only package. Do not attempt ESM import; it will fail. ↓
fix Use require() instead of import statements.
gotcha The package is auto-generated; manual edits will be overwritten on update. ↓
fix Modify the source at platform/nativescript/compiler in the main repo, not the published package.
deprecated As of Vue 3, NativeScript-Vue may be deprecated in favor of other solutions. This package may not receive further updates. ↓
fix Consider using NativeScript with Svelte or React Native instead.
Install
npm install akylas-nativescript-vue-template-compiler yarn add akylas-nativescript-vue-template-compiler pnpm add akylas-nativescript-vue-template-compiler Imports
- compile wrong
import { compile } from '@akylas/nativescript-vue-template-compiler'correctconst { compile } = require('@akylas/nativescript-vue-template-compiler') - default wrong
const compiler = require('akylas-nativescript-vue-template-compiler')correctconst compiler = require('@akylas/nativescript-vue-template-compiler') - compile wrong
import { compile } from '@akylas/nativescript-vue-template-compiler/compile'correctconst { compile } = require('@akylas/nativescript-vue-template-compiler')
Quickstart
const compiler = require('@akylas/nativescript-vue-template-compiler');
const template = `<Label text="Hello"/>`;
const result = compiler.compile(template, {});
console.log(result.render);