Closed zeeshan-mehdi closed 5 years ago
HI @zeeshan-mehdi,
I reviewed your project and noticed that you are using the new version of nativescript-theme-core
with the old imports, which brakes the sass compiler. You can check out the instructions here, where it is described, how to use the new theme. On my side, @import 'custom.css';
was also marked as an invalid import. Also, you should use nativescript-angular/http-client
instead of nativescript-angular/http
. I noticed that you are importing this module in app.module.ts
. There are some other errors that are connected with using some old angular functionality which should also be fixed. I am attaching the error log:
src/app/browse/bids/bids.component.ts:7:30 - error TS2307: Cannot find module '@angular/http/src/http_module'.
7 import { jsonpFactory } from '@angular/http/src/http_module';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/app/jobs/jobs.component.ts:14:49 - error TS2307: Cannot find module '@angular/core/src/view/provider'.
14 import { callLifecycleHooksChildrenFirst } from "@angular/core/src/view/provider";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/app/jobs/jobs.component.ts:16:22 - error TS2307: Cannot find module '@angular/core/src/render3'.
16 import { load } from "@angular/core/src/render3";
After fixing them, you should be able to build the project.
thank you tsoneven it was imports issue after i resolved these imports project was built successfully.
appreciate.
Built at: 27/08/2020 9:18:08 am Asset Size Chunks Chunk Names bundle.js 365 KiB bundle [emitted] bundle fonts/fa-brands-400.ttf 131 KiB [emitted] fonts/fa-regular-400.ttf 39.1 KiB [emitted] fonts/fa-solid-900.ttf 204 KiB [emitted] package.json 112 bytes [emitted] runtime.js 71.4 KiB runtime [emitted] runtime tns-java-classes.js 0 bytes [emitted] vendor.js 16.6 MiB vendor [emitted] vendor Entrypoint bundle = runtime.js vendor.js bundle.js [../$$_lazy_route_resource lazy recursive] ../$$_lazy_route_resource lazy namespace object 160 bytes {bundle} [built] [./app.scss] 121 KiB {bundle} [built] [./app/app.component.html] 329 bytes {bundle} [built] [./app/app.component.ts] 896 bytes {bundle} [built] [./app/app.module.ts] 1.36 KiB {bundle} [built] [./app/app.routing.ts] 653 bytes {bundle} [built] [./app/menu/menu.component.css] 19 bytes {bundle} [built] [./app/menu/menu.component.html] 1.05 KiB {bundle} [built] [./app/menu/menu.component.ts] 1.09 KiB {bundle} [built] [./app/services/dish.service.ts] 1.44 KiB {bundle} [built] [./app/services/process-httpmsg.service.ts] 784 bytes {bundle} [built] [./app/shared/baseurl.ts] 51 bytes {bundle} [built] [./main.ts] 1.84 KiB {bundle} [built] [./package.json] 100 bytes {bundle} [optional] [built]
my package.json is
{
"nativescript": {
"id": "org.nativescript.conFusion",
"tns-android": {
"version": "6.5.0"
},
"tns-ios": {
"version": "6.5.0"
}
},
"description": "NativeScript Application",
"license": "SEE LICENSE IN
what caused problem ?
My project was on cli version 5.3 i updated it to the latest cli version 6 and also updated all the packages including npm.
Problem
It says An uncaught Exception occurred on "main" thread.
System.err: Unable to start activity ComponentInfo{org.te.FirmApp/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed System.err: Error: Main entry is missing. App cannot be started. Verify app bootstrap. System.err: System.err: StackTrace: System.err: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.te.FirmApp/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate fai led
System.err: Error: Main entry is missing. App cannot be started. Verify app bootstrap.package.json
{ "nativescript": { "id": "org.te.FirmApp", "tns-ios": { "version": "6.0.1" }, "tns-android": { "version": "6.0.0" } }, "description": "NativeScript Application", "license": "SEE LICENSE IN <your-license-filename>", "repository": "<fill-your-repository-here>", "scripts": { "lint": "tslint \"src/**/*.ts\"" }, "dependencies": { "@angular/animations": "8.0.0", "@angular/common": "8.0.0", "@angular/compiler": "8.0.0", "@angular/core": "8.0.0", "@angular/forms": "8.0.0", "@angular/http": "8.0.0-beta.10", "@angular/platform-browser": "8.0.0", "@angular/platform-browser-dynamic": "8.0.0", "@angular/router": "8.0.0", "nativescript-angular": "8.0.2", "nativescript-checkbox": "^3.0.3", "nativescript-geolocation": "^5.1.0", "nativescript-imagepicker": "^6.2.0", "nativescript-loading-indicator": "^2.5.1", "nativescript-paypal-checkout": "^2.1.1", "nativescript-plugin-firebase": "^9.0.1", "nativescript-sqlite": "^2.3.3", "nativescript-theme-core": "~1.0.4", "nativescript-toast": "^2.0.0", "nativescript-ui-autocomplete": "5.0.0", "nativescript-ui-listview": "7.0.0", "nativescript-ui-sidedrawer": "7.0.0", "reflect-metadata": "~0.1.12", "rxjs": "~6.3.0", "tns-core-modules": "6.0.1", "zone.js": "0.9.1" }, "devDependencies": { "@angular/compiler-cli": "8.0.0", "@nativescript/schematics": "~0.5.0", "@ngtools/webpack": "8.0.0", "codelyzer": "~4.5.0", "nativescript-dev-webpack": "1.0.1", "tslint": "~5.11.0", "node-sass": "4.12.0", "typescript": "3.4.5" }, "gitHead": "803cec054c44c99eaa59cdc267993e6346f6cb3a", "readme": "NativeScript Application" }
main.ts
ts config
nsconfig
webpack-config.json
`const { join, relative, resolve, sep, dirname } = require("path");
const webpack = require("webpack"); const nsWebpack = require("nativescript-dev-webpack"); const nativescriptTarget = require("nativescript-dev-webpack/nativescript-target"); const { nsReplaceBootstrap } = require("nativescript-dev-webpack/transformers/ns-replace-bootstrap"); const { nsReplaceLazyLoader } = require("nativescript-dev-webpack/transformers/ns-replace-lazy-loader"); const { nsSupportHmrNg } = require("nativescript-dev-webpack/transformers/ns-support-hmr-ng"); const { getMainModulePath } = require("nativescript-dev-webpack/utils/ast-utils"); const CleanWebpackPlugin = require("clean-webpack-plugin"); const CopyWebpackPlugin = require("copy-webpack-plugin"); const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer"); const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin"); const TerserPlugin = require("terser-webpack-plugin"); const { getAngularCompilerPlugin } = require("nativescript-dev-webpack/plugins/NativeScriptAngularCompilerPlugin"); const hashSalt = Date.now().toString();
module.exports = env => { // Add your custom Activities, Services and other Android app components here. const appComponents = [ "tns-core-modules/ui/frame", "tns-core-modules/ui/frame/activity", ];
}; `
To Reproduce clone this project https://github.com/zeeshan-mehdi/driver-app