pnpm does not work with Meteor
Author: argghCreated Feb 8, 2020Updated Sep 15, 2026
LabelsconfirmedProject:NPMImpact:fewin-discussionidlemodern-build-stackNext 3.x.x
I was trying out pnpm, but couldn't get it to work out of the box with Meteor.
It's perhaps a compatibility issue in the way pnpm organizes packages in node_modules and how Meteor bundles those packages.
Reproduce
> meteor create pnpm-testapp
> cd testapp
> rm -rf node_modules
> rm package-lock.json
> meteor npm install -g pnpm
> meteor pnpm install
> meteor
...and you get this:
Stacktrace=> Started proxy.
W20200208-13:22:55.314(2)? (STDERR) /Users/arggh/.meteor/packages/meteor-tool/.1.9.0.aoqmdf.9052m++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/fibers.js:90
W20200208-13:22:55.357(2)? (STDERR) return fn.apply(this, arguments);
W20200208-13:22:55.357(2)? (STDERR) ^
W20200208-13:22:55.357(2)? (STDERR)
W20200208-13:22:55.357(2)? (STDERR) TypeError: Cannot read property 'indexOf' of undefined
W20200208-13:22:55.358(2)? (STDERR) at module (packages/babel-runtime.js:31:26)
W20200208-13:22:55.358(2)? (STDERR) at fileEvaluate (packages/modules-runtime.js:336:7)
W20200208-13:22:55.358(2)? (STDERR) at Module.require (packages/modules-runtime.js:238:14)
W20200208-13:22:55.358(2)? (STDERR) at require (packages/modules-runtime.js:258:21)
W20200208-13:22:55.358(2)? (STDERR) at packages/babel-runtime.js:53:15
W20200208-13:22:55.358(2)? (STDERR) at packages/babel-runtime.js:58:3
W20200208-13:22:55.359(2)? (STDERR) at /Users/arggh/Development/sandbox/pnpm-test/.meteor/local/build/programs/server/boot.js:398:38
W20200208-13:22:55.359(2)? (STDERR) at Array.forEach (<anonymous>)
W20200208-13:22:55.359(2)? (STDERR) at /Users/arggh/Development/sandbox/pnpm-test/.meteor/local/build/programs/server/boot.js:226:21
W20200208-13:22:55.359(2)? (STDERR) at /Users/arggh/Development/sandbox/pnpm-test/.meteor/local/build/programs/server/boot.js:461:7
=> Exited with code: 1
=> Your application is crashing. Waiting for file change.
Source: meteor/meteor