# How to use NPM packages outside of Node

DevFeed: [How to use NPM packages outside of Node](<https://devfeed.tech/articles/how-to-use-npm-packages-outside-of-node-5841.md>)

Original publisher: [Read original article](<https://neon.com/blog/using-npm-packages-outside-node>)

Author: George MacKerron

Published: 2023-11-06T14:27:53Z

Content type: tutorial

Language: en

Sources: [Blog -- Neon Docs](<https://devfeed.tech/sources/blog-neon-docs.md>)

Topics: [Node.js](<https://devfeed.tech/topics/node-js.md>)

Tags: [browsers](<https://devfeed.tech/tags/browsers.md>), [cloudflare-workers](<https://devfeed.tech/tags/cloudflare-workers.md>), [community](<https://devfeed.tech/tags/community.md>), [edge](<https://devfeed.tech/tags/edge.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [npm-packages](<https://devfeed.tech/tags/npm-packages.md>), [serverless](<https://devfeed.tech/tags/serverless.md>), [vercel](<https://devfeed.tech/tags/vercel.md>)

## AI overview

A tutorial on bundling npm packages so they can run outside Node.js, including serverless edge environments and browsers. It covers using esbuild and shim libraries for Node-specific imports and globals.

## Source excerpt

npm is bursting with useful libraries. But many of them assume they're running in Node.js, and throw errors elsewhere. Based on his experience developing Neon's serverless driver, George shows how you can run NPM packages in other places -- such as Vercel Edge Functions, or even w...