Comments (3)
Maybe it's a nodejs bug, it works fine with synchronized imports, so it's not a dependency issue with pnpm, it's a logic issue with node running .mjs?
import * as isEven from "is-even"
setTimeout(async () => {
// await import("is-even") // this package is actually useful for something wow
console.log(isEven) // [Module: null prototype] { default: [Function: isEven] }
});
from pnpm.
You may see it works with npm
from pnpm.
You may see it works with
npm
You can also use tsx to run the code and there will be no errors.
pnpm i tsx -g
tsx ./index.mjs
from pnpm.
Related Issues (20)
- `winget upgrade pnpm` will remove the PATH FROM user env path, and won't added the new PATH to user env path again. HOT 1
- Add a self upgrade options
- `pnpm up` doesn't update `peerDependencies`
- `pnpm install` without input fails when already node_modules exists HOT 2
- print how to upgrade pnpm when `packageManager` version doesn't match HOT 1
- `package-manager-strict` enforcement in pnpm 9 is a massive headache HOT 24
- Error while running `pnpm run ...` HOT 2
- [Feat/Bug] `pnpm init` does not respect `init.*` options as flags like `npm init --init-*` HOT 3
- PNPM consider Turborepo packages as npm packages HOT 2
- v9 install command upgrades Lockfile in CI environment HOT 1
- "pnpm why" doesn't work properly
- pnpm can create forbidden file name on windows HOT 1
- package peerDependencies are written into the lock file as if they were dependencies. HOT 1
- I cannot update version HOT 3
- `pnpm outdated` is suggesting an *older* version as the latest version
- Can't use pnpm global packages via SSH
- EBUSY: resource busy or locked and EPERM: operation not permitted on windows
- jsonwebtoken package is not compatible
- Missing dev dependencies (or executables) in Dockerfile HOT 1
- add npm "home" command
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pnpm.