Closed sebastiandg7 closed 1 year ago
@sebastiandg7 Thanks for trying out Nx and reporting this back to us. This seems like an issue on our end and I created an internal ticket for it.
Hey 👋 I think this should no longer be an issue because missing perf_hooks
APIs have been implemented. I am going to close this. If you run into more problems with this, please file a new issue.
Describe the bug:
The Nx CLI is not able to properly run inside a WebContainer. The error seems to be related with the
perf_hooks
package.Link to the blitz that caused the error https://stackblitz.com/edit/nx-workspace-empty
Steps to reproduce:
npm run nx list
Expected behavior:
The CLI should run and give an output similar to this:
Click to expand
``` npm run nx list > myorg@0.0.0 nx > nx "list" > NX Installed plugins: @nrwl/jest (builders,generators) @nrwl/linter (builders) @nrwl/workspace (builders,generators) > NX Also available: @nrwl/angular (generators) @nrwl/cypress (executors,generators) @nrwl/express (executors,generators) @nrwl/nest (executors,generators) @nrwl/next (executors,generators) @nrwl/node (executors,generators) @nrwl/nx-plugin (executors,generators) @nrwl/react (executors,generators) @nrwl/storybook (executors,generators) @nrwl/web (executors,generators) > NX Community plugins: nx-electron - An Nx plugin for developing Electron applications nx-stylelint - Nx plugin to use stylelint in a nx workspace @nxtend/ionic-react - An Nx plugin for developing Ionic React applications and libraries @nxtend/ionic-angular - An Nx plugin for developing Ionic Angular applications and libraries @nxtend/capacitor - An Nx plugin for developing cross-platform applications using Capacitor @nxtend/firebase - An Nx plugin for developing applications using Firebase @angular-architects/ddd - Nx plugin for structuring a monorepo with domains and layers @offeringsolutions/nx-karma-to-jest - Nx plugin for replacing karma with jest in an Nx workspace @flowaccount/nx-serverless - Nx plugin for node/angular-universal schematics and deployment builders in an Nx workspace @ns3/nx-serverless - Nx plugin for node serverless applications in an Nx workspace @ns3/nx-jest-playwright - Nx plugin to run jest-playwright e2e tests in an Nx workspace @dev-thought/nx-deploy-it - Nx plugin to deploy applications on your favorite cloud provider @offeringsolutions/nx-protractor-to-cypress - Nx plugin to replace protractor with cypress in an nx workspace @nx-tools/nx-docker - Nx plugin to build docker images of your affected apps @angular-custom-builders/lite-serve - Nx plugin to run the e2e test on an existing dist folder @nx-plus/nuxt - Nx plugin adding first class support for Nuxt in your Nx workspace. @nx-plus/vue - Nx plugin adding first class support for Vue in your Nx workspace. @nx-plus/docusaurus - Nx plugin adding first class support for Docusaurus in your Nx workspace. @twittwer/compodoc - Nx Plugin to integrate the generation of documentation with Compodoc in the Nx workflow @nxext/svelte - Nx plugin to use Svelte within nx workspaces @nxext/stencil - Nx plugin to use StencilJs within nx workspaces @joelcode/gcp-function - Nx plugin to generate, test, lint, build, serve, & deploy Google Cloud Function @nx-go/nx-go - Nx plugin to use Go in a Nx workspace @angular-architects/module-federation - Nx plugin to use webpack module federation @nxrocks/nx-spring-boot - Nx plugin to generate, run, package, build (and more) Spring Boot projects inside your Nx workspace @trumbitta/nx-plugin-openapi - OpenAPI Plugin for Nx. Keep your API spec files in libs, and auto-generate sources. @nxrocks/nx-flutter - Nx Plugin adding first class support for Flutter in your Nx workspace @srleecode/domain - Nx Plugin for allowing operations to occur at the domain level instead of the default library level @jscutlery/semver - Nx plugin to automate semantic versioning and CHANGELOG generation. ngx-deploy-npm - Publish your libraries to NPM with just one command. @trafilea/nx-shopify - Nx plugin for developing performance-first Shopify themes nx-dotnet - Nx plugin for developing and housing .NET projects within an Nx workspace. @nxrocks/nx-quarkus - Nx plugin to generate, run, package, build (and more) Quarkus projects inside your Nx workspace @nx-extend/translations - Nx plugin to extract, pull, push and translate your apps translations > NX NOTE Use "nx list [plugin]" to find out more ```Version of webcontainer: Hash: 57be275669708b1d42e233d60c80159bef577631
Screenshots:
Desktop (please complete the following information): Browser name = Chrome Full version = 91.0.4472.77 Major version = 91 navigator.appName = Netscape navigator.userAgent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36 performance.memory = { "totalJSHeapSize": 79671752, "usedJSHeapSize": 73199176, "jsHeapSizeLimit": 4294705152 }
Additional context:
The error can be reproduced by running
perf_hooks
separately. See this example: https://stackblitz.com/edit/node-9zsb4r