nativescript-schematics icon indicating copy to clipboard operation
nativescript-schematics copied to clipboard

Migrating existing angular project (Specified module does not exist)

Open ShahnavazKazi opened this issue 6 years ago • 2 comments

Environment Provide the content of the package.json file in the project:

{ "name": "MyApp", "description": "My Application", "version": "1.0.0", "private": true, "scripts": { "ng": "ng", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", "gen-stats": "ng build --prod --stats-json", "bundle-report": "webpack-bundle-analyzer pkg/mint-app/stats.json" }, "devDependencies": { "@angular-devkit/build-angular": "^0.803.3", "@angular/cli": "^8.3.3", "@angular/compiler-cli": "^8.2.5", "@angular/language-service": "^8.2.5", "@types/jasmine": "^3.4.0", "@types/jasminewd2": "^2.0.6", "@types/node": "^12.7.4", "browser-sync": "^2.26.7", "class-transformer": "^0.2.0", "codelyzer": "^4.5.0", "del": "^1.2.0", "gulp": "^3.9.1", "gulp-asset-versioning": "^0.1.2", "gulp-bower": "0.0.14", "gulp-cache-bust": "^1.4.1", "gulp-concat": "^2.5.2", "gulp-cssmin": "^0.2.0", "gulp-debug": "^2.0.1", "gulp-filter": "^2.0.2", "gulp-plumber": "^1.0.1", "gulp-print": "^2.0.1", "gulp-replace": "^0.6.1", "gulp-sass": "^4.0.2", "gulp-sequence": "^1.0.0", "gulp-sourcemaps": "^2.6.4", "gulp-uglify": "^3.0.1", "jasmine": "^2.4.1", "jasmine-core": "^3.2.1", "jasmine-spec-reporter": "^4.2.1", "karma": "^3.1.0", "karma-chrome-launcher": "^2.2.0", "karma-coverage-istanbul-reporter": "^2.0.5", "karma-jasmine": "^1.1.2", "karma-jasmine-html-reporter": "^1.3.1", "main-bower-files": "^2.13.1", "merge-stream": "^1.0.1", "natives": "^1.1.6", "path": "^0.12.7", "prettier": "^1.15.3", "protractor": "^5.4.1", "ts-node": "^7.0.1", "tslint": "^5.11.0", "typescript": "3.5.3", "uglify-es": "^3.3.9", "webpack-bundle-analyzer": "^3.4.1", "yargs": "^11.0.0" }, "dependencies": { "@angular/animations": "^8.2.5", "@angular/cdk": "^8.1.4", "@angular/common": "^8.2.5", "@angular/compiler": "^8.2.5", "@angular/core": "^8.2.5", "@angular/forms": "^8.2.5", "@angular/http": "^7.2.15", "@angular/material": "^8.1.4", "@angular/platform-browser": "^8.2.5", "@angular/platform-browser-dynamic": "8.2.5", "@angular/router": "^8.2.5", "@angular/upgrade": "^8.2.5", "nativescript-angular": "^8.2.1", "nativescript-theme-core": "^2.0.17", "@nativescript/schematics": "^0.7.1", "@netbasal/ngx-content-loader": "^2.1.3", "@ng-bootstrap/ng-bootstrap": "^4.2.1", "@ngx-progressbar/core": "^5.3.1", "@ngx-progressbar/http": "^5.3.1", "adal-angular4": "^3.0.16", "ag-grid-angular": "^21.1.0", "ag-grid-community": "^21.1.0", "angular": "1.6.2", "angular-in-memory-web-api": "^0.6.1", "bootstrap": "^4.3.1", "core-js": "^2.6.9", "d3": "^5.7.0", "dayjs": "^1.8.15", "font-awesome": "^4.7.0", "gulp-angular-templatecache": "^2.2.6", "ng-multiselect-dropdown": "^0.2.3", "ngx-avatar": "^3.2.0", "ngx-device-detector": "^1.3.5", "ngx-slick-carousel": "^0.4.4", "rxjs": "^6.3.3", "slick-carousel": "^1.8.1", "smoothscroll-polyfill": "^0.4.3", "underscore": "^1.9.1", "zone.js": "^0.8.26" } }

Describe the bug Followed this article to migrate existing Angular web project to Nativescript and on below step I get an error:

ng add @nativescript/schematics

Reading Project Settings
    Project settings:
    {
      "root": "",
      "sourceRoot": ".",
      "mainName": "main",
      "mainPath": "src/main.ts",
      "prefix": "app",
      "tsConfig": "src/tsconfig.app.json",
      "entryModuleClassName": "MyAppModule",
      "entryModuleImportPath": "./app/app.module",
      "entryModuleName": "MyApp",
      "entryModulePath": "src/app/app.module.ts",
      "entryComponentClassName": "AppComponent",
      "entryComponentImportPath": "./app.component",
      "entryComponentName": "App",
      "entryComponentPath": "src/app/app.component.ts",
      "indexAppRootTag": "app-root"
    }
    Adding @nativescript/schematics to angular.json
    Adding {N} files
    Adding App_Resources
    Adding NativeScript specific exclusions to .gitignore
    Adding NativeScript run scripts to package.json
    Adding NativeScript Project ID to package.json
    Modifying web tsconfig
    Modifying tslint.json
    Adding Sample Shared Component
Specified module does not exist

To Reproduce Run this command on an existing angular project: ng add @nativescript/schematics

Expected behavior Nativescript schematics should get added successfully.

ShahnavazKazi avatar Sep 13 '19 05:09 ShahnavazKazi

@ShahnavazKazi Any Fix for these Issue

akashthakur05 avatar Jul 03 '20 09:07 akashthakur05

any fix?

{ "name": "angular-starter", "version": "10.1.4", "scripts": { "ng": "ng", "start": "ng serve --port 4200", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", "dev:ssr": "ng run angular-starter:serve-ssr", "serve:ssr": "node dist/angular-starter/server/main.js", "build:ssr": "ng build --prod && ng run angular-starter:server:production", "prerender": "ng run angular-starter:prerender" }, "repository": { "type": "git", "url": "https://github.com/ganatan//angular10-app.git" }, "author": { "name": "danny", "email": "[email protected]", "url": "https://www.ganatan.com/" }, "license": "ISC", "bugs": { "url": "https://github.com/ganatan/angular10-app/issues" }, "homepage": "https://github.com/ganatan/angular10-app#readme", "private": true, "dependencies": { "@angular/animations": "10.1.4", "@angular/common": "10.1.4", "@angular/compiler": "10.1.4", "@angular/core": "10.1.4", "@angular/forms": "10.1.4", "@angular/platform-browser": "10.1.4", "@angular/platform-browser-dynamic": "10.1.4", "@angular/platform-server": "10.1.4", "@angular/router": "10.1.4", "angular-in-memory-web-api": "0.11.0", "@angular/service-worker": "10.1.4", "@asymmetrik/ngx-leaflet": "8.1.0", "@fortawesome/fontawesome-free": "5.15.0", "@nguniversal/express-engine": "10.1.0", "bootstrap": "5.0.0-alpha1", "express": "4.17.1", "chart.js": "2.9.3", "leaflet": "1.7.1", "ng2-charts": "2.4.2", "rxjs": "6.6.3", "tslib": "2.0.1", "zone.js": "0.11.1" }, "devDependencies": { "@angular-devkit/build-angular": "0.1001.4", "@angular/cli": "10.1.4", "@angular/compiler-cli": "10.1.4", "@nativescript/schematics": "^10.1.0", "@nguniversal/builders": "10.1.0", "@types/express": "4.17.8", "@types/jasmine": "3.5.14", "@types/jasminewd2": "2.0.8", "@types/node": "14.11.2", "codelyzer": "6.0.1", "jasmine-core": "3.6.0", "jasmine-spec-reporter": "6.0.0", "karma": "5.2.3", "karma-chrome-launcher": "3.1.0", "karma-coverage-istanbul-reporter": "3.0.3", "karma-jasmine": "4.0.1", "karma-jasmine-html-reporter": "1.5.4", "protractor": "7.0.0", "ts-node": "9.0.0", "tslint": "6.1.3", "typescript": "4.0.3" } }

javatutorials2016 avatar Oct 07 '20 02:10 javatutorials2016