3

Environment

'tns info' √ Getting NativeScript components versions information... ‼ Update available for component nativescript. Your current version is 5.1.0 and the latest available version is 5.1.1. ‼ Update available for component tns-core-modules. Your current version is 5.1.1 and the latest available version is 5.1.2. √ Component tns-android has 5.1.0 version and is up to date. × Component tns-ios is not installed.

  • CLI: @angular/[email protected]
  • Cross-platform modules: N/A
  • Android Runtime: latest
  • iOS Runtime: N/A
  • Plugin(s): N/A .

In my workspace I have two nativescript + angular code sharing projects. In my actual projects in a workspace I have an nsconfig.file that points to the files as well as overridden in webpack.config.js for testing as I am not fully sure if the nsconfig is working as expected

When generating a new platform it can never find the Android Manifest in a project, (which is expected) I assume on build It will override these values anyways. However Near the end of running 'tns run android --bundle' it seems to try to direct to a default folder of 'app/' which I cannot see even in a new code sharing project by itself so I am led to believe this is some sort of default path.

Error as as follows:

...
[./package.json] 129 bytes {bundle} [optional] [built]
    + 382 hidden modules
Webpack compilation complete. Watching for file changes.
Webpack build done!
Could not find folder: C:\Users\userNameHere\Desktop\projects\myProjects\AngularWorkSpace\app
Unable to apply changes on device: emulator-5554. Error is: ENOENT: no such file or directory, stat 'C:\Users\userNameHere\Desktop\projects\myProjects\AngularWorkSpace\app\App_Resources\Android'.

All project specific files would be in workspace/projects/applicationOne not workspace/app which I believe is some sort of default path if nothing is found.

Showing Angular workspace with 2 projects and a feature library: image

image

To Reproduce

Create a new empty workspace Add 2 nativescript Angular code sharing projects Add a library (possibly not neccessary) Set up similar structure for reusable platform and webpack.

Update nsconfig inside project 1 and 2
{
  "appResourcesPath": "projects/applicationOne/App_Resources",
  "appPath": "projects/applicationOne/src",
  "nsext": ".tns",
  "webext": "",
  "shared": true
}

Expected behavior

Should be able to have an Angular workspace with multiple applications projects added. 1 webpack.config.js for handling building. An nsconfig.js per application in the projects folder for paths. To build per application.

Additional context

I believe I have everything set up correctly. I think the only issue is Could not find folder: C:\Users\userNameHere\Desktop\projects\myProjects\AngularWorkSpace**\app** The \app i think is the default when a path is not specific or found. it should be pointing to AngularWorkspace/projects/applicationOne

Update:

When I do not override the values for appPath and appResourcesPath in the webpack.config.js file I notce the paths will faile back all of them to workspace/app. This leads me to believe the build is using appPath somewhere else outside of webpack and that I am not overriding it soon enough.

I have read about updating webpack variables such as appPath from the command line, I think the reason is the application is not picking up from the nsconfig from projects/applicationOne and therefor defaults. I think if I can update this value as well as appResourcesPath from the command line then the builds should work.

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.