Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pnpm error upon fresh install in embroider app #964

Open
rreckonerr opened this issue Aug 30, 2022 · 2 comments
Open

pnpm error upon fresh install in embroider app #964

rreckonerr opened this issue Aug 30, 2022 · 2 comments

Comments

@rreckonerr
Copy link

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/@babel+core@7.18.13/node_modules/@babel/core/lib/config/files/plugins.js
- /app-root/node_modules/.pnpm/@babel+core@7.18.13/node_modules/@babel/core/lib/config/files/index.js
- /app-root/node_modules/.pnpm/@babel+core@7.18.13/node_modules/@babel/core/lib/index.js
- /app-root/node_modules/.pnpm/broccoli-babel-transpiler@7.8.1/node_modules/broccoli-babel-transpiler/lib/worker.jsError: Cannot find module '@babel/plugin-proposal-object-rest-spread'
Require stack:
- /app-root/node_modules/.pnpm/@babel+core@7.18.13/node_modules/@babel/core/lib/config/files/plugins.js
- /app-root/node_modules/.pnpm/@babel+core@7.18.13/node_modules/@babel/core/lib/config/files/index.js
- /app-root/node_modules/.pnpm/@babel+core@7.18.13/node_modules/@babel/core/lib/index.js
- /app-root/node_modules/.pnpm/broccoli-babel-transpiler@7.8.1/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/@babel+core@7.18.13/node_modules/@babel/core/lib/config/files/plugins.js:157:9)
    at resolveStandardizedNameForRequire (/app-root/node_modules/.pnpm/@babel+core@7.18.13/node_modules/@babel/core/lib/config/files/plugins.js:195:19)
    at sync (/app-root/node_modules/.pnpm/@babel+core@7.18.13/node_modules/@babel/core/lib/config/files/plugins.js:224:12)
    at sync (/app-root/node_modules/.pnpm/gensync@1.0.0-beta.2/node_modules/gensync/index.js:182:19)
    at /app-root/node_modules/.pnpm/gensync@1.0.0-beta.2/node_modules/gensync/index.js:210:24
    at Generator.next (<anonymous>)
    at resolvePlugin (/app-root/node_modules/.pnpm/@babel+core@7.18.13/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
@rreckonerr
Copy link
Author

If you're looking for a workaround, create a .npmrc file with this content:

public-hoist-pattern[]=*eslint*
public-hoist-pattern[]=*prettier*
public-hoist-pattern[]=@babel/*

https://stackoverflow.com/questions/73637664/pnpm-error-upon-fresh-install-in-embroider-app?noredirect=1#comment130084949_73637664

@RobbieTheWagner
Copy link
Contributor

I just hit this too. I wonder why the babel plugins are even needed for this addon? Optional chaining has been around a long time now, for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants