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

Error "Cannot read properties of null (reading 'npmScope')" when generating docusaurus app #271

Open
mrWh1te opened this issue Sep 4, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@mrWh1te
Copy link

mrWh1te commented Sep 4, 2022

Current Behavior

The Docusaurus Nx plugin errors out when running this command: nx g @nx-plus/docusaurus:app my-app

>  NX  Generating @nx-plus/docusaurus:application
>  NX   Cannot read properties of null (reading 'npmScope')

Expected Behavior

To build a new Docusaurus app in the apps directory, ready to go, with the provided name my-app.

Steps to Reproduce

Reproduces in a fresh Nx workspace.

  1. npx create-nx-workspace@^14.0.0
  2. npm install @nx-plus/docusaurus --save-dev
  3. nx g @nx-plus/docusaurus:app my-app

Failure Logs

>  NX  Generating @nx-plus/docusaurus:application
>  NX   Cannot read properties of null (reading 'npmScope')

TypeError: Cannot read properties of null (reading 'npmScope')
    at buildProjectConfigurationFromPackageJson (/home/username/Projects/doc_plugin_test/node_modules/nx/src/config/workspaces.js:513:16)
    at buildWorkspaceConfigurationFromGlobs (/home/username/Projects/doc_plugin_test/node_modules/nx/src/config/workspaces.js:568:28)
    at readRawWorkspaceJson (/home/username/Projects/doc_plugin_test/node_modules/nx/src/generators/utils/project-configuration.js:318:87)
    at addProjectToWorkspaceJson (/home/username/Projects/doc_plugin_test/node_modules/nx/src/generators/utils/project-configuration.js:214:27)
    at setProjectConfiguration (/home/username/Projects/doc_plugin_test/node_modules/nx/src/generators/utils/project-configuration.js:205:5)
    at addProjectConfiguration (/home/username/Projects/doc_plugin_test/node_modules/nx/src/generators/utils/project-configuration.js:22:5)
    at /home/username/Projects/doc_plugin_test/node_modules/@nx-plus/docusaurus/src/generators/application/generator.js:70:46
    at Generator.next (<anonymous>)
    at /home/username/Projects/doc_plugin_test/node_modules/tslib/tslib.js:118:75
    at new Promise (<anonymous>)

Environment

Plugin name and version: @nx-plus/docusaurus: v14.1.0

 >  NX   Report complete - copy this into the issue template

   Node : 18.4.0
   OS   : linux x64
   npm  : 8.13.2
   
   nx : 14.6.4
   @nrwl/angular : Not Found
   @nrwl/cypress : Not Found
   @nrwl/detox : Not Found
   @nrwl/devkit : 14.6.4
   @nrwl/eslint-plugin-nx : Not Found
   @nrwl/express : Not Found
   @nrwl/jest : 14.6.4
   @nrwl/js : Not Found
   @nrwl/linter : 14.6.4
   @nrwl/nest : Not Found
   @nrwl/next : Not Found
   @nrwl/node : Not Found
   @nrwl/nx-cloud : Not Found
   @nrwl/nx-plugin : Not Found
   @nrwl/react : Not Found
   @nrwl/react-native : Not Found
   @nrwl/schematics : Not Found
   @nrwl/storybook : Not Found
   @nrwl/web : Not Found
   @nrwl/workspace : 14.6.4
   typescript : 4.8.2
   ---------------------------------------
   Local workspace plugins:
   ---------------------------------------
   Community plugins:
         @nx-plus/docusaurus: 14.1.0
@mrWh1te mrWh1te added the bug Something isn't working label Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant