4
votes

Can it be that "shared code" does not get along with the latest Angular-Cli 9?

I get with this command:

ng new MyApp --collection @ nativescript / schematics --shared --sample

The following error message:

npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated npm ERR! code ETARGET npm ERR! notarget No matching version found for @angular/http@~9.1.0. npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist. npm ERR! notarget npm ERR! notarget It was specified as a dependency of 'CommunityPlanner' npm ERR! notarget

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\patri\AppData\Roaming\npm-cache_logs\2020-06-21T09_33_18_448Z-debug.log × Package install failed, see above. The Schematic workflow failed. See above.

2

2 Answers

2
votes

This is currently an issue for the nativescript dependency blueprint. Source: https://github.com/NativeScript/nativescript-schematics/issues/278

@angular/http is deprecated and does not have version 9, the http libraries are inside @angular/common instead.

Workaround:
After running ng new MyApp --collection @nativescript/schematics --shared --sample, your project folder should be created.

Go to package.json in your project folder

  1. Remove @angular/http under "dependencies"
  2. Change "@nativescript/schematics": "~2.0.0" to "@nativescript/schematics": "~9.0.0" under "devDependencies"
0
votes

I am getting the same (but worse) issue. Normal nativescript angular project builds fine. After running ng new MyApp --collection @nativescript/schematics --shared --sample

Get this error:

Installing packages...npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @angular/http@~9.1.0.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget 
npm ERR! notarget It was specified as a dependency of 'myProject'
npm ERR! notarget 

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/me/.npm/_logs/2020-08-02T07_34_55_277Z-debug.log
✖ Package install failed, see above.
The Schematic workflow failed. See above.