question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue
  • 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 git@github.com: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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
yarnbotcommented, 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.

0reactions
merceyzcommented, Jun 9, 2020

Based on what I said in https://github.com/yarnpkg/berry/issues/847#issuecomment-583061865 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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: spawn ENOTDIR, when selecting python interpreter in ...
The problem was in the version of the python extension I was using(2020.1.57204). what I did was installed a slightly older version ...
Read more >
Error: spawn ENOTDIR - Serverless Forums
Hi, at the moment I see this error when I was trying to run sls deploy on my local.
Read more >
cross-spawn | Yarn - Package Manager
A cross platform solution to node's spawn and spawnSync. Installation. Node.js version 8 and up: $ npm install cross-spawn.
Read more >
Visual Studio Code: "spawn ENOTDIR" error - Lean community
OK, that could be reasonable if you ran elan show in a random directory. When you're running VS Code, are you opening a...
Read more >
Original error: Could not sign with default certificate. Original ...
Original error spawn ENOTDIR. [APPIUM LOG]. Appium] Appium v1.17.1 creating new AndroidUiautomator2Driver (v1.44.2) session
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found