question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NS 7 with Angular application entry point not being found

See original GitHub issue

Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): ✔ Your ANDROID_HOME environment variable is set and points to correct directory. ✔ Your adb from the Android SDK is correctly installed. ✔ The Android SDK is installed. ✔ A compatible Android SDK for compilation is found. ✔ Javac is installed and is configured properly. ✔ The Java Development Kit (JDK) is installed and is configured properly. ✔ Xcode is installed and is configured properly. ✔ xcodeproj is installed and is configured properly. ✔ CocoaPods are installed. ✔ CocoaPods update is not required. ✔ CocoaPods are configured properly. ✔ Your current CocoaPods version is newer than 1.0.0. ✔ Python installed and configured correctly. ✔ The Python ‘six’ package is found. ✔ Xcode version 11.6.0 satisfies minimum required version 10. ✔ Getting NativeScript components versions information… ⚠ Update available for component nativescript. Your current version is 7.0.7-2020-09-09-185920-14263 and the latest available version is 7.0.7. ✔ Component @nativescript/core has 7.0.2 version and is up to date. ✖ Component @nativescript/ios is not installed. ✔ Component @nativescript/android has 7.0.0 version and is up to date.

Describe the bug

After upgrading a code sharing project with Angular to version 7 (using ns migrate) produces a project that results in the following errors being thrown when ns run android is run.

  • Web project only HTML files are being flagged as invalid. (It seems these files are being included regardless).
  • Application entry point file not found error, even with "main": "main.js" is defined in package.json or nativescript.config.ts

I noticed that during migration, the old tsconfig.tns.json is removed. Without this the project doesn’t even start up and notes that a tsconfig file cannot be found. Adding back in my original tsconfig.tns.json file allows the compilation process to start but then throws up the aforementioned errors.

My tsconfig.tns.json

{
  "extends": "./tsconfig.base.json",
  "compilerOptions": {
    "module": "esNext",
    "target": "es2015",
    "moduleResolution": "node",
    "skipLibCheck": true,
    "resolveJsonModule": true,
    "paths": {
      // Paths removed for clarity
    }
  },
  "files": ["apps/my-app/src/main.tns.ts"]
}

My nativescript.config.ts

// Identifiable names changed / removed
import { NativeScriptConfig } from '@nativescript/core';

export default {
  id: 'com.company.my-app',
  appResourcesPath: 'apps/my-app/App_Resources',
  android: {
    v8Flags: '--expose_gc --harmony_destructuring',
    markingMode: 'none',
  },
  appPath: 'apps/my-app/src',
  main: 'main.js',
  nsext: '.tns',
  webext: '',
  shared: true,
  useLegacyWorkflow: false,
  webpackConfigPath: './webpack.config.tns.js',
} as NativeScriptConfig;

It is worth noting that this project is included within a @nrwl/nx workspace and was working perfectly prior to the upgrade process.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
brookesb91commented, Sep 11, 2020

This is where tsconfig.tns.json is deleted if not in a shared project

https://github.com/NativeScript/nativescript-cli/blob/3f710eae6fce0c7ba8a45a3b5959d0bf04353e9d/lib/controllers/migrate-controller.ts#L801-L810

Wonder how it ended up being deleted in your project - because it does seem you have @nativescript/schematics in there.

Other than that, the main tsconfig.json is updated to es2017 etc. - but other configs are left untouched.

No idea either, but it happens when running ns migrate and leaves just the new nativescript.config.ts. Even when adding the tsconfig back in, I’m still faced with the entry point was not found issue.

0reactions
JimLynchCodescommented, Dec 24, 2022

I’m getting this error too. Can’t seem to find any way to run the examples here: https://github.com/ProgressNS/nativescript-ui-samples-angular

Read more comments on GitHub >

github_iconTop Results From Across the Web

Where is the entry point specified in angular application
I'm new in angular and got sample angular application installed using angular-cli. This has package. json file, which must usually have the  ......
Read more >
Firebase JavaScript SDK Release Notes - Google
Fixed the Node.js ESM bundle to build from the Node.js entry point (it was incorrectly using the browser entry point). See Github issue...
Read more >
Testing Guide - OWASP Foundation
For example, a test on a web application that has already been created, but where the testing party does not have access to...
Read more >
Toward the Detection of Relativistic Image Doubling in Water ...
The image going up toward the entry point will not be observable after 21.58 ns but the one going down will continue to...
Read more >
Introduction | NativeScript
Provide a value for the main property specifying the primary entry point to your app (usually app.js). Note this property value is NOT...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found