on 08-25-2020 7:27 AM
I create an extension of MDK with Business Application Studio followed :
in the main-module.ts file , the code is issue:
import { Observable } from 'tns-core-modules/data/observable';
issue : Cannot find module 'tns-core-modules/data/observable'.ts(2307)
I have checked the tsconfig.json file ,it seems OK.
Also,I followed other documents like :
https://developers.sap.com/tutorials/cp-mobile-dev-kit-slider-extension.html
It also has this kind of issue -- the .ts file .
I don't know why,is there something I missed?
690_haieroversea
You will need to make sure you update your externals reference in BAS to include nativescript-ui-chart so it can deploy to mobile services.
{
"java.jdt.ls.vmargs": "-DwatchParentProcess=false -noverify -Xmx512m -XX:+UseG1GC -XX:+UseStringDeduplication",
"java.configuration.checkProjectSettingsExclusions": false,
"java.configuration.updateBuildConfiguration": "automatic",
"java.autobuild.enabled": false,
"files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true,
"**/.extension": true
},
"ports.excludeExposeNotification": {
"ports": [ 8000, 8005, 8009 ],
"ranges": [ {
"from": 0,
"to": 0
} ]
},
"spring-boot.ls.checkJVM": false,
"workbench.iconTheme": "theia-file-icons",
"workbench.list.openMode": "singleClick",
"workspace.preserveWindow": false,
"mdk.validateBeforeBundle": false,
"mdk.bundlerExternals": [
"nativescript-ui-chart"
],
"mck.mobileservices": []
}
--Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
690_haieroversea
Are you talking about error showing up in .ts files in MDK editor (WebIDE/BAS) ?
If so, you can ignore it. There is currently no reference of such libraries in the editor hence you see that "cannot find module..." errors. This is handled at runtime in MDK client. These errors should not stop you deploying your metadata project to Mobile Services.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunally,if l leave the error in .ts files,it will cause error when deploy the Application.app.
ModuleNotFoundError:Modulenotfound: Error: Can't resolve './main-model' in '/tmp/vscode-unpacked/vscode_npm_@ext-mdkvsc-npm-rel_mdkvsc-wing@1.2.23/extension/tools/application-bundler/build.definitions/NS_CustomerSales/Extensions/SalesChartModule/controls',ModuleNotFoundError: Module not found: Error: Can't resolve 'nativescript-ui-chart'in'/tmp/vscode-unpacked/vscode_npm_@ext-mdkvsc-npm-rel_mdkvsc-wing@1.2.23/extension/tools/application-bundler/build.definitions/NS_CustomerSales/Extensions/SalesChartModule/controls'
undefined
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.