List of useful npx (NPM Package Runner) commands.
Using NPX we can execute/run node binaries without the need to install it locally or globally.
- Download the latest zsh package: https://packages.msys2.org/package/zsh?repo=msys&variant=x86_64
Example:
zsh-5.7.1-1-x86_64.pkg.tar.xz
Feel free to use this presentation as a reference.
Open this CodeSandbox and start editing. It will automatically create a fork (that is, a duplicate) for you to work on.
This is the message you should have received from Heroku in your mailbox some weeks/days ago:
[Shutdown Notice]: mLab MongoDB add-on Dear Heroku customer,
We have identified you as the owner of, or collaborator on, the following apps that have the mLab MongoDB add-on installed:
...list of projects...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Sequelize = require("sequelize"); | |
const sequelize = new Sequelize("postgres://user:pass@localhost:5432/codeworks"); | |
sequelize.authenticate().then(() => { | |
console.log("connected to database"); | |
}).catch(() => { | |
console.error("failed to connect to database"); | |
}) |
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'
instead ofconst foo = require('foo')
to import the package. You also need to put"type": "module"
in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)
from CommonJS instead ofrequire(…)
. - Stay on the existing version of the package until you can move to ESM.