Registry / web-framework / prn-metro-bundler

prn-metro-bundler

JSON →
library0.0.1jsnpmunverified

Metro is the JavaScript bundler for React Native, designed for sub-second reload cycles, fast startup, and quick bundling speeds. It handles thousands of modules in a single application and is integrated with every React Native project out of the box. Version 0.0.1 appears to be a fork (prn-metro-bundler) of the original Facebook metro-bundler, but the npm package seems to be a placeholder or mis-published. The original metro-bundler was previously part of the react-native repository and is now maintained separately. Note: The correct npm package for the official Metro bundler is 'metro' (or 'metro-bundler' as an alias), but the version 0.0.1 shown here is likely a test/published fork from a Chinese company (pinguo-zhangzhi).

npm install prn-metro-bundler
INSTALL
IMPORT
SIG · PRN-METRO-BUNDLER
P
prn-metro-bundler
web-frameworkjavascriptv0.0.1
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
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 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

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

Metro
✓ import Metro from 'metro'
✗ const Metro = require('metro')
ESM-only; CommonJS require is not supported for metro package since v0.55.
runBuild
✓ import { runBuild } from 'metro'
✗ import { runBuild } from 'metro-bundler'
runBuild is not exported from 'metro-bundler'; use 'metro' instead.
createServer
✓ import { createServer } from 'metro'
✗ const createServer = require('metro-bundler').createServer
Use 'metro' package; 'metro-bundler' is an alias but not recommended.

Creates a Metro bundler server alongside an Express app, demonstrating basic use of Metro's server creation.

import Metro from 'metro'; import express from 'express'; const app = express(); const port = process.env.PORT || 8081; // Start Metro bundler server Metro.createServer().then(server => { server.listen(port, () => { console.log(`Metro bundler running on port ${port}`); }); }); app.get('/', (req, res) => { res.send('Hello from Metro bundler'); }); app.listen(3000, () => { console.log('Express server listening on port 3000'); });
Debug
Known issues
gotchaThis package (prn-metro-bundler v0.0.1) is a fork from pinguo-zhangzhi and is likely not the official Metro bundler. Use the official 'metro' package instead.
fix
Install 'metro' from npm: npm install metro
affects: 0.0.1
deprecatedThe official metro-bundler package is deprecated; use 'metro' instead.
fix
Replace 'metro-bundler' with 'metro' in package.json and imports.
affects: >=0.50
breakingIn Metro v0.50+, the API changed from default export to named exports. Old code using `const Metro = require('metro-bundler')` will break.
fix
Use named imports: `import { createServer } from 'metro'`.
affects: >=0.50
Errors
Common errors & fixes
Cannot find module 'metro-bundler'
The package 'metro-bundler' is deprecated and not available on npm (only historical).
fix
Install 'metro' instead: npm install metro
require('metro-bundler') returns undefined
Metro v0.50+ switched to ESM only; CommonJS require does not work.
fix
Use ES module import: import Metro from 'metro'
Upgrade
Version history
0.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
prn-metro-bundler — npm install prn-metro-bundler · libregistry