Skip to content

Could not find module "@nativescript/schematics" #130

@hopkinsjj9

Description

@hopkinsjj9

After issuing:
sudo yarn global add @nativescript/schematics

warning "@nativescript/schematics@0.3.3" has no binaries

'/Users/xxx/.npm-global/lib/node_modules'
total 0
0 drwxr-xr-x 6 root staff 192B Oct 10 17:05 ./
0 drwxr-xr-x 3 root staff 96B Oct 10 17:05 @angular-devkit/
0 drwxr-xr-x 3 root staff 96B Oct 10 17:02 @nativescript/
0 drwxr-xr-x 27 root staff 864B Oct 10 17:00 nativescript/
0 drwxr-xr-x 3 root staff 96B Oct 7 14:44 @angular/

I then try to use @nativescript/schematics:

ng new --collection=@nativescript/schematics --name=my-app

Could not find module "@nativescript/schematics" from "/Users/xxx/nscript".

Any suggestions why ng new doesn't recognize @nativescript/schematics?

It looks like ng new is looking in Users/xxx/.config/yarn/global/node_modules, but I don't see a @nativescript/schematics entry there.

Could not find module "@nativescript/schematics" from "/Users/jackhopkins/nscript".
Error: Could not find module "@nativescript/schematics" from "/Users/jackhopkins/nscript".
at Object.resolve (/Users/jackhopkins/.config/yarn/global/node_modules/@angular-devkit/core/node/resolve.js:141:11)
at NodeModulesEngineHost._resolvePackageJson (/Users/jackhopkins/.config/yarn/global/node_modules/@angular-devkit/schematics/tools/node-module-engine-host.js:28:21)
at NodeModulesEngineHost._resolveCollectionPath (/Users/jackhopkins/.config/yarn/global/node_modules/@angular-devkit/schematics/tools/node-module-engine-host.js:69:40)
at NodeModulesEngineHost.createCollectionDescription (/Users/jackhopkins/.config/yarn/global/node_modules/@angular-devkit/schematics/tools/file-system-engine-host-base.js:111:27)
at SchematicEngine._createCollectionDescription (/Users/jackhopkins/.config/yarn/global/node_modules/@angular-devkit/schematics/src/engine/engine.js:147:40)
at SchematicEngine.createCollection (/Users/jackhopkins/.config/yarn/global/node_modules/@angular-devkit/schematics/src/engine/engine.js:140:43)
at NewCommand.getCollection (/Users/jackhopkins/.config/yarn/global/node_modules/@angular/cli/models/schematic-command.js:74:35)
at NewCommand.getOptions (/Users/jackhopkins/.config/yarn/global/node_modules/@angular/cli/models/schematic-command.js:292:33)
at NewCommand. (/Users/jackhopkins/.config/yarn/global/node_modules/@angular/cli/commands/new-impl.js:37:49)
at Generator.next ()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions