pnpm error upon fresh install in embroider app

234 views Asked by At

I switched to pnpm in most of the apps that I maintain and it's an amazing tool. What I don't understand is how to troubleshoot dependency issues. I would really appreciate some help.

The problem comes from one ember-specific addon, and I opened a new issue in their repo, but I'd like to be able to figure out what to do in case issues like that happen with dependencies in general.


The error is Cannot find module ..., if you add the missing module there's another "missing" one and another one and another one ...

❯ ember s
Building into /private/var/folders/k0/b1p9d5g94px8gdr10458gv0m0000gn/T/embroider/96cc9c
Build Error (broccoli-persistent-filter:Babel > [Babel: ember-table]) in ember-table/ember-table/-private/collapse-tree.js

Cannot find module '@babel/plugin-proposal-object-rest-spread'
Require stack:
- /app-root/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/config/files/plugins.js
- /app-root/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/config/files/index.js
- /app-root/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/index.js
- /app-root/node_modules/.pnpm/[email protected]/node_modules/broccoli-babel-transpiler/lib/worker.jsError: Cannot find module '@babel/plugin-proposal-object-rest-spread'
Require stack:
- /app-root/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/config/files/plugins.js
- /app-root/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/config/files/index.js
- /app-root/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/index.js
- /app-root/node_modules/.pnpm/[email protected]/node_modules/broccoli-babel-transpiler/lib/worker.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at resolve (internal/modules/cjs/helpers.js:107:19)
    at tryRequireResolve (/app-root/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/config/files/plugins.js:157:9)
    at resolveStandardizedNameForRequire (/app-root/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/config/files/plugins.js:195:19)
    at sync (/app-root/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/config/files/plugins.js:224:12)
    at sync (/app-root/node_modules/.pnpm/[email protected]/node_modules/gensync/index.js:182:19)
    at /app-root/node_modules/.pnpm/[email protected]/node_modules/gensync/index.js:210:24
    at Generator.next (<anonymous>)
    at resolvePlugin (/app-root/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/config/files/plugins.js:83:17)
    at resolvePlugin.next (<anonymous>)


Stack Trace and Error Report: /var/folders/k0/b1p9d5g94px8gdr10458gv0m0000gn/T/error.dump.8c92aeb46d1be7e57b69153a731964ac.log

Steps to reproduce

  1. ember init -sn -sb -sg --no-welcome --embroider
  2. pnpm install
  3. Confirm no build error ember s
  4. ember install ember-table
  5. See the build error ember s

Environment

❯ ember --version && pnpm --version && node --version
ember-cli: 4.6.0
node: 14.19.1
os: darwin x64
7.9.4
v14.19.1
0

There are 0 answers