Yes
Please, ensure your title is less than 63 characters long and starts with a capital
letter.
iOS
Application prepares/builds, deploys to simulator, but fails to start displaying the following error in the console:
[native code]: JS ERROR Error: Could not find module './'. Computed path '/Users/gdereese/Library/Developer/CoreSimulator/Devices/15B2BE33-AE47-485D-9D8B-8B08F7CC6C3A/data/Containers/Bundle/Application/CE093ADC-5CFB-4D69-9A52-121B037460C8/nativescriptjserrordemo.app/app'.
Hi @gdereese,
Please verify, if you are using latest LTS node version 6.11.2. Also, I found that in the project is missing the tsconfig.json file. could you add this file in the root project folder and to add the following content in it.
Then delete node_modules, platforms and hooks folder and try to rebuild the app.
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"noEmitHelpers": true,
"noEmitOnError": true,
"lib": [
"es6",
"dom",
"es2015.iterable"
],
"baseUrl": ".",
"paths": {
"*": [
"./node_modules/tns-core-modules/*",
"./node_modules/*"
]
}
},
"exclude": [
"node_modules",
"platforms",
"**/*.aot.ts"
]
}
Let me know, whether this helps or if I could assist you further.
Thanks. I previously had a more current Node.js installed, so I reverted it to 6.11.2, added the missing tsconfig.json, cleaned the requested directories and built again.
As before, the app builds successfully, but I still get the reported error when debugging the app in iOS.
I think I resolved the issue. Turns out I had deleted the package.json file that existed inside the /app folder thinking it was something that was only needed for the template used to seed the project. Once I put it back, the error was no longer reported.
i removed ios platform tns platform remove ios
and run again tns run ios
and it's ok !
Just wanted to say that for me, it was caused by not installing new node modules that were added in newer commits to the app. Deleting the node-modules folder and then running npm i fixed the issue.
@BRO-mesdocteurs BRO, you saved me. I was pulling my hair out. Thank you.
still not working for me after all the instruction above explained
i am using nativescript angular shared repo
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
I think I resolved the issue. Turns out I had deleted the package.json file that existed inside the /app folder thinking it was something that was only needed for the template used to seed the project. Once I put it back, the error was no longer reported.