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

TypeError: core_1.PriorityQueue is not a constructor #239

Closed
playground opened this issue Jan 28, 2018 · 11 comments
Closed

TypeError: core_1.PriorityQueue is not a constructor #239

playground opened this issue Jan 28, 2018 · 11 comments
Labels

Comments

@playground
Copy link

@nrwl/schematics@0.6.19 or 0.7.0-beta.3

ng new "my-workspace" "--directory=experimental" "--npm-scope=mx" --collection=@nrwl/schematics

failed with TypeError: core_1.PriorityQueue is not a constructor

However, version 0.7.0-beta.2 created workspace successfully.

@zpydee
Copy link

zpydee commented Jan 29, 2018

also getting core_1.PriorityQueue is not a constructor when using create-nx-workspace after fresh yarn global add

@jogelin
Copy link
Contributor

jogelin commented Jan 29, 2018

same for me, I would init a new monorepo for my company today but getting this error

$create-nx-workspace frontend --npm-scope=myScope
Creating a sandbox with the CLI and Nx Schematics...
Cached binary found at C:\Users\jgelin\AppData\Roaming\npm-cache\node-sass\4.7.2\win32-x64-59_binding.node
Binary found at C:\Users\jgelin\AppData\Local\Temp\tmp-8328DBEm0XrCcp6f\node_modules\node-sass\vendor\win32-x64-59\binding.node
Testing binary
Binary is fine
added 1002 packages in 100.503s
ng new "frontend" "--npm-scope=myScope" --collection=@nrwl/schematics
core_1.PriorityQueue is not a constructor
TypeError: core_1.PriorityQueue is not a constructor
    at new TaskScheduler (C:\Users\jgelin\AppData\Local\Temp\tmp-8328DBEm0XrCcp6f\node_modules\@angular-devkit\schematics\src\engine\task.js:20:23)
    at SchematicEngine.createContext (C:\Users\jgelin\AppData\Local\Temp\tmp-8328DBEm0XrCcp6f\node_modules\@angular-devkit\schematics\src\engine\engine.js:81:31)
    at SchematicImpl.call (C:\Users\jgelin\AppData\Local\Temp\tmp-8328DBEm0XrCcp6f\node_modules\@angular-devkit\schematics\src\engine\schematic.js:35:38)
    at Promise (C:\Users\jgelin\AppData\Local\Temp\tmp-8328DBEm0XrCcp6f\node_modules\@angular\cli\tasks\schematic-run.js:73:23)
    at new Promise (<anonymous>)
    at Class.run (C:\Users\jgelin\AppData\Local\Temp\tmp-8328DBEm0XrCcp6f\node_modules\@angular\cli\tasks\schematic-run.js:72:16)
    at Class.run (C:\Users\jgelin\AppData\Local\Temp\tmp-8328DBEm0XrCcp6f\node_modules\@angular\cli\tasks\init.js:71:33)
    at Class.run (C:\Users\jgelin\AppData\Local\Temp\tmp-8328DBEm0XrCcp6f\node_modules\@angular\cli\commands\new.js:134:25)
    at resolve (C:\Users\jgelin\AppData\Local\Temp\tmp-8328DBEm0XrCcp6f\node_modules\@angular\cli\ember-cli\lib\models\command.js:261:20)
    at new Promise (<anonymous>)
child_process.js:614
    throw err;
    ^

Error: Command failed: C:\Users\jgelin\AppData\Local\Temp\tmp-8328DBEm0XrCcp6f\node_modules\.bin\ng new "frontend" "--npm-scope=myScope" --collection=@nrwl/schematics
    at checkExecSyncError (child_process.js:574:11)
    at Object.execSync (child_process.js:611:13)
    at Object.<anonymous> (C:\Users\jgelin\AppData\Local\Yarn\config\global\node_modules\@nrwl\schematics\bin\create-nx-workspace.js:40:17)
    at Module._compile (module.js:641:30)
    at Object.Module._extensions..js (module.js:652:10)
    at Module.load (module.js:560:32)
    at tryModuleLoad (module.js:503:12)
    at Function.Module._load (module.js:495:3)
    at Function.Module.runMain (module.js:682:10)
    at startup (bootstrap_node.js:191:16)

@zpydee
Copy link

zpydee commented Jan 29, 2018

also succeeding with 0.7.0-beta.2

@rahulsahay19
Copy link

Hi,

I am also having the same issue. Please find the stack below.

`D:\Rahul\MyExperiments\angular-5-apps\MultiSPA
λ create-nx-workspace support-ticket-suite --directory=ticket-system --npm-scope=suite
Creating a sandbox with the CLI and Nx Schematics...
Cached binary found at C:\Users\rahuls\AppData\Roaming\npm-cache\node-sass\4.7.2\win32-x64-57_binding.node
Binary found at C:\Users\rahuls\AppData\Local\Temp\tmp-172OHZ5GtTiiyA4\node_modules\node-sass\vendor\win32-x64-57\binding.node
Testing binary
Binary is fine
added 887 packages in 92.244s
ng new "support-ticket-suite" "--directory=ticket-system" "--npm-scope=suite" --collection=@nrwl/schematics
core_1.PriorityQueue is not a constructor
TypeError: core_1.PriorityQueue is not a constructor
at new TaskScheduler (C:\Users\rahuls\AppData\Local\Temp\tmp-172OHZ5GtTiiyA4\node_modules@angular-devkit\schematics\src\engine\task.js:20:23)
at SchematicEngine.createContext (C:\Users\rahuls\AppData\Local\Temp\tmp-172OHZ5GtTiiyA4\node_modules@angular-devkit\schematics\src\engine\engine.js:81:31)
at SchematicImpl.call (C:\Users\rahuls\AppData\Local\Temp\tmp-172OHZ5GtTiiyA4\node_modules@angular-devkit\schematics\src\engine\schematic.js:35:38)
at Promise (C:\Users\rahuls\AppData\Local\Temp\tmp-172OHZ5GtTiiyA4\node_modules@angular\cli\tasks\schematic-run.js:73:23)
at Promise ()
at Class.run (C:\Users\rahuls\AppData\Local\Temp\tmp-172OHZ5GtTiiyA4\node_modules@angular\cli\tasks\schematic-run.js:72:16)
at Class.run (C:\Users\rahuls\AppData\Local\Temp\tmp-172OHZ5GtTiiyA4\node_modules@angular\cli\tasks\init.js:71:33)
at Class.run (C:\Users\rahuls\AppData\Local\Temp\tmp-172OHZ5GtTiiyA4\node_modules@angular\cli\commands\new.js:134:25)
at resolve (C:\Users\rahuls\AppData\Local\Temp\tmp-172OHZ5GtTiiyA4\node_modules@angular\cli\ember-cli\lib\models\command.js:261:20)
at Promise ()
child_process.js:634
throw err;
^

Error: Command failed: C:\Users\rahuls\AppData\Local\Temp\tmp-172OHZ5GtTiiyA4\node_modules.bin\ng new "support-ticket-suite" "--directory=ticket-system" "--npm-scope=suite" --collection=@nrwl/schematics
at checkExecSyncError (child_process.js:591:13)
at Object.execSync (child_process.js:631:13)
at Object. (C:\Users\rahuls\AppData\Roaming\npm\node_modules@nrwl\schematics\bin\create-nx-workspace.js:40:17)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
at Function.Module.runMain (module.js:609:10)
at startup (bootstrap_node.js:158:16)

D:\Rahul\MyExperiments\angular-5-apps\MultiSPA`

Any resolution or workaround to this issue?

Thanks,
Rahul

@axtho
Copy link

axtho commented Jan 30, 2018

Check which schematics version you are running. I got it to work with 0.7.0-beta.2 (you need to pin your dependency to this). Beta.3 and the 0.6.19 Branch produced the issue you mentioned.

@zpydee
Copy link

zpydee commented Jan 30, 2018

pls also see possible related issue from CLI

@jogelin
Copy link
Contributor

jogelin commented Jan 31, 2018

Fixed for me by using 0.7.0

@probert94
Copy link

SInce the fix seems to be to update angular-devkit/core to 0.0.29, it might be solved with #245

@JoseRFJuniorLLMs
Copy link

angular-devkit/core": "0.0.29

@vsavkin
Copy link
Member

vsavkin commented Feb 19, 2018

The issue has been fixed here: #240

@vsavkin vsavkin closed this as completed Feb 19, 2018
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

8 participants