nx: create-nx-workspace is not working

create-nx-workspace fails at ng new <app name> --collection=@nrwl/schematics with the message core_1.PriorityQueue is not a constructor

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 18
  • Comments: 22 (4 by maintainers)

Most upvoted comments

I had the same issue. After updating to 0.7.0-beta.1 , I was able to successfully run the create-nx-workspace command

npm remove -g @nrwl/schematics npm install -g @nrwl/schematics@0.7.0-beta.1

Hopefully that work around helps others

I was able to set up the workspace following @jfc37 instructions. Able to create apps and libs.

Issue persists with @nrwl/schematics@0.7.0-beta.3 and @angular/cli@1.6.6

It still doesn’t work.

I just start a new workspace with version 7.1.0 and same issue! I guess issue has to be reopen! It is my first attempt to use Nx 😄

I worked by partially rewriting the installed create-nx-workspace command.

seems to be a problem that @angular-devkit/core@0.0.28 is referenced in the sunbox.

https://github.com/nrwl/nx/blob/master/packages/schematics/bin/create-nx-workspace.ts

writeFileSync(
  path.join(tmpDir, 'package.json'),
  JSON.stringify({
    dependencies: {
      '@nrwl/schematics': nxVersion,
      '@angular/cli': `file:${path.join(
        path.dirname(__dirname),
        'src',
        'collection',
        'application',
        'files',
        '__directory__',
        '.angular_cli165.tgz'
      )}`,
      '@angular-devkit/core': '^0.0.28' // <-- rewrite ^0.0.29
    }
  })
);

  • Since the thing that is installed is converted to javascript, please look for the same place.
  • I do not know the reason why semantic versioning is not working properly.