Skip to content

[Bug] @ampproject/rollup-plugin-closure-compiler - spawn ENOTDIR #847

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

Closed
1 task
FezVrasta opened this issue Jan 30, 2020 · 7 comments
Closed
1 task

[Bug] @ampproject/rollup-plugin-closure-compiler - spawn ENOTDIR #847

FezVrasta opened this issue Jan 30, 2020 · 7 comments
Labels
bug Something isn't working stale Issues that didn't get attention

Comments

@FezVrasta
Copy link

  • I'd be willing to implement a fix

Describe the bug

I'm trying to upgrade @popperjs/popper-core to Yarn 2 but after I get yarn install to work and I try to run the rollup script, I get the following error:

[!] (plugin closure-compiler) Error: spawn ENOTDIR
Error: spawn ENOTDIR
    at ChildProcess.spawn (internal/child_process.js:371:11)
    at spawn (child_process.js:561:9)
    at Compiler.run (/Users/federicozivolo/Projects/popper.js/.yarn/cache/google-closure-compiler-npm-20200112.0.0-18a3ebc35d-1.zip/node_modules/google-closure-compiler/lib/node/closure-compiler.js:76:26)
    at Promise (/Users/federicozivolo/Projects/popper.js/.yarn/$$virtual/@ampproject-rollup-plugin-closure-compiler-virtual-868f7daf3c/0/cache/@ampproject-rollup-plugin-closure-compiler-npm-0.20.0-094d347941-1.zip/node_modules/@ampproject/rollup-plugin-closure-compiler/dist/index.js:1181:18)
    at new Promise (<anonymous>)
    at compiler (/Users/federicozivolo/Projects/popper.js/.yarn/$$virtual/@ampproject-rollup-plugin-closure-compiler-virtual-868f7daf3c/0/cache/@ampproject-rollup-plugin-closure-compiler-npm-0.20.0-094d347941-1.zip/node_modules/@ampproject/rollup-plugin-closure-compiler/dist/index.js:1171:12)
    at renderChunk (/Users/federicozivolo/Projects/popper.js/.yarn/$$virtual/@ampproject-rollup-plugin-closure-compiler-virtual-868f7daf3c/0/cache/@ampproject-rollup-plugin-closure-compiler-npm-0.20.0-094d347941-1.zip/node_modules/@ampproject/rollup-plugin-closure-compiler/dist/index.js:1225:25)

I tried to use pnpify but it doesn't seem to help.

To Reproduce

git clone [email protected]:popperjs/popper-core.git
git checkout chore/yarn2
yarn
yarn build:bundles

Environment if relevant (please complete the following information):

  • OS: macoS
  • Node version 11.15.0
  • Yarn version 2.0.0-rc.28
@FezVrasta FezVrasta added the bug Something isn't working label Jan 30, 2020
@arcanis
Copy link
Member

arcanis commented Jan 30, 2020

It seems google-closure-compiler-java contains binaries called through spawn, so we need to force-unplug it.

@FezVrasta
Copy link
Author

FezVrasta commented Jan 30, 2020

Is there something I can do or it must be fixed on Yarn side?

I tried to run yarn unplug @ampproject/rollup-plugin-closure-compiler and yarn unplug google-closure-compiler-java but it still errors.

@merceyz
Copy link
Member

merceyz commented Feb 6, 2020

From installing @ampproject/rollup-plugin-closure-compiler I see that at least these packages need to be unplugged

  • google-closure-compiler-linux
  • google-closure-compiler-osx
  • google-closure-compiler-java
  • google-closure-compiler-windows

Yarn will unplug the following packages for you, while you need to take care of the rest

@yarnbot
Copy link
Collaborator

yarnbot commented Jun 9, 2020

Hi! 👋

This issue looks stale, and doesn't feature the reproducible label - which implies that you didn't provide a working reproduction using Sherlock. As a result, it'll be closed in a few days unless a maintainer explicitly vouches for it or you edit your first post to include a formal reproduction (you can use the playground for that).

Note that we require Sherlock reproductions for long-lived issues (rather than standalone git repositories or similar) because we're a small team. Sherlock gives us the ability to check which bugs are still affecting the master branch at any given point, and decreases the amount of code we need to run on our own machines (thus leading to faster bug resolution faster). It helps us help you! 😃

If you absolutely cannot reproduce a bug on Sherlock (for example because it's a Windows-only issue), a maintainer will have to manually add the upholded label.

@yarnbot yarnbot added the stale Issues that didn't get attention label Jun 9, 2020
@FezVrasta
Copy link
Author

FezVrasta commented Jun 9, 2020

Hey @yarnbot , I have provided the reproducible example. And the problem has been acknowledged.

Now, can we ban all the stupid bots from GitHub please?

@arcanis
Copy link
Member

arcanis commented Jun 9, 2020

@FezVrasta You did provide a reproduction, but not in a format that Sherlock understands. As a result, checking whether this problem is fixed requires human intervention, which makes it unlikely it'll ever get closed, even if fixed (because we prefer to spend our time fixing bugs and implementing features, not really closing issues, see).

@merceyz
Copy link
Member

merceyz commented Jun 9, 2020

Based on what I said in #847 (comment) the fix was to run yarn unplug google-closure-compiler-linux google-closure-compiler-osx.

I just tested on your repo and it works after fixing some issues, here are the commands I ran to make yarn build:bundles work

git clone https://github.com/popperjs/popper-core.git
yarn set version 2
printf "yarnPath: .yarn/releases/yarn-berry.js\npackageExtensions:\n  'babel-plugin-add-import-extension@*':\n    dependencies:\n      '@babel/helper-plugin-utils': '*'\n    peerDependencies:\n      '@babel/core': '*'" > .yarnrc.yml
yarn add @babel/plugin-proposal-object-rest-spread -D
yarn unplug rollup-plugin-visualizer google-closure-compiler-linux google-closure-compiler-osx
yarn build:bundles

Note: tested on a Windows machine so I didn't actually have to unplug google-closure-compiler-linux and google-closure-compiler-osx

@merceyz merceyz closed this as completed Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale Issues that didn't get attention
Projects
None yet
Development

No branches or pull requests

4 participants