MenuTroubleshooting / A package will not install or work

Docs / Troubleshooting

A package will not install or work

Search and install need a connection. Some packages need a setup step that JSpark does not run.

On this page

No connection

Searching npm needs a connection. With none, the search box in the Packages window shows a warning mark, and the list says You’re offline. Hover the mark: You're offline — search and install need a connection. What's already installed still works.

Offline, the search can only find packages already installed.

Connect to the internet, and search again. Packages that are already installed keep working offline.

Install errors JSpark+

Installing, updating and removing packages is JSpark+. In JSpark, the packages that Starters use and imports from a CDN work without it. An install that cannot reach npm says one of these:

  • Can’t reach npm. Check your connection.
  • npm stopped responding. Check your connection.
  • Not cached. Go online to install.

Connect, and press Install again.

A skipped setup step

Some npm packages run a setup script when they are installed, for example to download a program they need. JSpark never runs these scripts. When a package, or a package it uses, has one, the package’s page in the Packages window says so:

This package had a setup step, and JSpark skipped it.

The package may still work. If it does not, the error comes when you use it. A package that downloads a binary for Node, for example, fails at require or import. There is no way to run the step in JSpark. Try a package that does the same work in plain JavaScript.

A Web package offline

A package is installed once, for Node and for web pages. The web version is built from esm.sh, so it needs a connection the first time. Installed offline, the package works in Node at once, and its page in the Packages window says:

The Node version is ready; the web version waits for a connection.

Until then, a web page that imports it gets an error in its console: the package isn't ready for Web Snippets yet — its Web version needs a connection to finish installing. Connect to the internet. The web version finishes by itself. Then run the page again. From then on, it works offline.

See Packages.

The pictures show JSpark on a Mac. On Windows, the window buttons are at the top right, the menus are in theMenu button at the left end of the tabs, and shortcuts use Ctrl where a Mac uses ⌘. The rest works the same way.

Esc

Type to search every docs page.

JSpark is downloading

When you open JSpark-Setup.exe, Windows may stop it once, because the installer isn’t code-signed yet. If the file came from jspark.app:

A blue Windows box, “Windows protected your PC”: Microsoft Defender SmartScreen prevented an unrecognised app from starting. Under it, the link More info, and the button Don’t run.

1Click More info.

The same box after More info: Application JSpark-Setup-1.4.0.exe, Publisher Unknown publisher, and the buttons Run anyway and Don’t run.

2Then click Run anyway.

You see this only once: updates install inside the app. More in Install JSpark.