-
Notifications
You must be signed in to change notification settings - Fork 52
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
Brand new nx workspace cannot find xplat #73
Comments
Seeing the same with: @nrwl/schematics:7.5.0 |
@brunobertechini sounds like the postinstall did not run as it should have set the default schematics to @nstudio/schematics. Try running |
I have been unable to repro this. In your root
Also open
Alternatively you can also use Angular Console if you have the dependency in your workspace package.json
|
@brunobertechini @midsever were you still seeing issue here? Try with |
This issue has been closed but its still happening. The cause is, in fact, a failure to run the post install as @NathanWalker said. The root cause appears to be a script error. Here's my output when trying to install the schematics: `PS C:\Users\jleig\Dvlp\nx-on-fire-one> npm install @nstudio/schematics --save-dev
I just installed all cli's (angular, ionic, nx,...) today and created this workspace so I have the latest of everything. This is what was installed:
Can we get this reopened and the error addressed? |
Thanks for reporting back 👍 - wasn't sure if cleared or not. Definitely so I see you're on Windows and I'm wondering if original reported @brunobertechini is also on Windows? Perhaps could provide a clue. |
/cc @m-abs perhaps the new postinstall syntax is not Windows friendly? |
@JefferE try running it directly with this command:
Lemme know if you get any issue with that. |
Hmm, it appears to run (no errors) but it does not update the defaultCollection in Angular.json It's still set to "defaultCollection": "@nrwl/schematics", after I run it. |
Interesting for sure. This gives us something to go on, thank you. |
I also had to set manually the defaultCollection attribute in order to make it work. |
Just encountered the same issue and I'm on Windows 10. Like @NathanWalker said, the new postinstall syntax is not Windows friendly. Is it really necessary to test the existence of the script before running it though ? I also tried running the postinstall.js script directly and like others it did nothing. After adding some traces, I found out it stops here:
This is because on windows the path will contain I simply fixed the script by changing the previous line to this:
Post install works fine with this. @NathanWalker I can create a PR for the latest if you want. |
This is fantastic @madmath03 thank you! Yes a PR would be much appreciated. And we can probably remove that syntax on postinstall. A couple months back I setup a new workstation and don’t have a windows environment setup yet so been hard to clear the windows related issues. |
I apologize for not responding earlier but I wanted to confirm as well that I'm on a Windows 10 environment and I did basically the same thing as madmath03 and that seemed to work. If I manually changed the defaultCollection as suggested I wasn't able to create an app. I don't receive any errors and no files are produced. |
No worries @midsever - this fix is now available in |
Just created new nrwl/nx workspace and installed @nstudio/schematics.
ng g xplat --prefix=myprefix --platforms=nativescript
Schematic "xplat" not found in collection "@nrwl/schematics"
Schematic "app.nativescript" not found in collection "@nrwl/schematics".
"@nrwl/nx": "7.4.1",
`ng --version
Package Version
@angular-devkit/architect 0.11.4
@angular-devkit/build-angular 0.11.4
@angular-devkit/build-optimizer 0.11.4
@angular-devkit/build-webpack 0.11.4
@angular-devkit/core 7.1.4
@angular-devkit/schematics 7.1.4
@angular/cli 7.1.4
@ngtools/webpack 7.1.4
@schematics/angular 7.1.4
@schematics/update 0.11.4
rxjs 6.3.3
typescript 3.1.6
webpack 4.23.1
`
The text was updated successfully, but these errors were encountered: