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

yarn prepack results in error "Cannot find name 'queueMicrotask'" #1038

Closed
fransflippo opened this issue May 29, 2021 · 6 comments
Closed

yarn prepack results in error "Cannot find name 'queueMicrotask'" #1038

fransflippo opened this issue May 29, 2021 · 6 comments
Labels
regression Issue that regresses existing functionality

Comments

@fransflippo
Copy link

Summary

Generating a new plugin and running yarn prepack results in an error from the Typescript compiler.

Steps To Reproduce:

  1. Generate a new plugin with sfdx plugins:generate
  2. cd into the directory that is created
  3. run yarn prepack

Expected result

Compilation is successful.

Actual result

Error is displayed:

yarn run v1.22.10
$ rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme
node_modules/@sinonjs/fake-timers/types/fake-timers-src.d.ts:11:28 - error TS2304: Cannot find name 'queueMicrotask'.

11     queueMicrotask: typeof queueMicrotask;
                              ~~~~~~~~~~~~~~


Found 1 error.

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Additional information

SFDX CLI Version: sfdx-cli/7.103.0 darwin-x64 node-v14.17.0

OS and version: MacOS 10.14.6

Node version: v13.2.0

@peternhale peternhale transferred this issue from forcedotcom/sfdx-plugin-generate Jun 7, 2021
@peternhale peternhale added the regression Issue that regresses existing functionality label Jun 7, 2021
@uip-robot-zz
Copy link

This issue has been linked to a new work item: W-9368257

@peternhale
Copy link
Contributor

@fransflippo Thank for bring this issue to our attention. We are working on a permanent fix for this issue. In the mean time try this workaround.

yarn remove @types/node
yarn add @types/jsforce -D
yarn prepack

@simonwatson
Copy link

Thanks @peternhale, I had the same issue with a newly-generated plugin and your suggested workaround fixed it for me :-)

@fransflippo
Copy link
Author

Thank you @peternhale , that works!

@marshallvaughn
Copy link

@fransflippo Thank for bring this issue to our attention. We are working on a permanent fix for this issue. In the mean time try this workaround.

yarn remove @types/node
yarn add @types/jsforce -D
yarn prepack

This worked for me, thanks!

@gjtorikian
Copy link

This problem still appears. After much finagling, I came across this error: The engine "node" is incompatible with this module. Expected version "^12.20.0 || ^14.13.1 || >=16.0.0". Got "14.5.0".

Judging by that, I upgrade my Node version from 14.5 to 14.13.1, and was able to run yarn prepack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Issue that regresses existing functionality
Projects
None yet
Development

No branches or pull requests

7 participants