Skip to content

FAQ ​

Do I need Node.js or npm? ​

No. Teloce-NPM talks to the npm registry directly, unpacks the tarballs in Python and bundles with a Python package (MinifyJS, which ships esbuild). There is no node_modules folder.

How is this different from npm install? ​

npm install builds a node_modules tree meant for Node.js and usually needs a separate bundler for the browser. Teloce-NPM fetches only the packages you name, produces one browser-ready file per package, verifies and scans each one, and gives you use('name') in your .vel files. It is not a general-purpose replacement for npm: it has no scripts, no dev-dependencies and no workspace support.

Which packages work? ​

Browser libraries: Day.js, Lodash, D3, Chart.js, Three.js, Monaco, marked, DOMPurify, PapaParse, Fuse.js, canvas-confetti, SortableJS and highlight.js are all tested (see examples/). Packages that need Node.js built-ins at runtime, native add-ons, or a build step missing from the published tarball do not work. See Wrapper formats.

Why does install need the internet? ​

To download packages the first time, to look them up in the OSV vulnerability database, and to check the registry for the same integrity hash as your lockfile. Once a package is in the cache and its scan is current, rebuilding it does not need the registry, though the vulnerability lookup is still attempted (it only warns if OSV cannot be reached, unless you set security.require_osv).

Can I use a private registry? ​

Only if it needs no authentication. Set registry to its URL. It must be https://, or http:// on localhost. Other hosts that serve the tarballs go in security.allowed_registries. Token or .npmrc authentication is not supported yet.

Can I work offline? ​

After one online install, yes, for packages that are already cached and scanned by the current scanner. A cache entry made with --no-verify, or by an older scanner, is not trusted by a normal install and needs the network again.

Is --no-verify safe? ​

No. It skips the code scan and the vulnerability lookup. Integrity is still verified, so you get the bytes the registry published, but nothing checks that they are harmless. Prefer security.allow, which allows exactly the reviewed findings for exactly one package. Installs made with --no-verify are marked "scan_result": "skipped" in the lockfile.

Why was my package blocked? ​

The scanner found something it treats as dangerous, such as eval, Function(), or a Node built-in. It prints what it found, in which file, and the exact security.allow entry to add if you decide the package is fine. Lodash, for example, uses Function in _.template. See Troubleshooting.

Does the scan guarantee a package is safe? ​

No. It is static analysis and raises the cost of an attack. It cannot prove code is harmless. Keep the lockfile under version control, review new dependencies, and pin versions you rely on.

What should I commit? ​

teloce-npm.json, teloce-npm.lock and your sources. Do not commit .teloce-npm/, dist/ or static/teloce-npm/; they are regenerated by teloce-npm install.

How do I install in CI? ​

bash
teloce-npm install --frozen-lockfile

It installs exactly what the lockfile pins and fails if anything is missing or its integrity changed. Cache .teloce-npm/ between runs to save downloads.

How do I update a package? ​

bash
teloce-npm update            # all packages, within their ranges
teloce-npm update chart.js   # one package

A package written as chart.js@^4 stays in 4.x. To move to a new major, install it explicitly: teloce-npm install chart.js@5.

How big is the result? ​

One file per package, plus a small loader.js, use.js and manifest.json. Sizes are shown by teloce-npm list. Bundled packages are minified by default. Monaco, with its workers and fonts, is about 24 MB on disk; Day.js is 7.5 KB.

Can I use a package in more than one page? ​

Only the file named by entry_html gets the script tags. To use packages in another page, add the same block to it, or make it the entry. See HTML injection.

Can I use TypeScript or JSX in packages? ​

Packages must be published as JavaScript. Teloce-NPM does not compile TypeScript or JSX sources.

Does it work with a Content-Security-Policy? ​

The runtime loads package files from your own origin with import() and needs no inline scripts of its own. A package that uses eval or Function needs 'unsafe-eval', which is also what the scanner warns about. See HTML injection.

Which operating systems are supported? ​

It is pure Python and developed and tested on Linux. It should run on macOS and Windows, but those are not tested yet.

Can I use it without Teloce? ​

Yes. Teloce-NPM does not depend on Teloce-Py or on any framework. Any HTML page can load the generated loader.js and use.js and call use(). See Plain HTML, CSS and JavaScript.

Does it work with Flaxon and server-side rendering? ​

Yes. Flaxon and SSR hosts generate their own page, so you set entry_html to null and add the script tags yourself. See Flaxon and Server-side rendering.

Released under the MIT License.