EddyVerbruggen / nativescript-directions

:point_up_2: :point_right: :point_down: :point_left: Open the Maps app to show directions to anywhere you like
MIT License
83 stars 21 forks source link

Can't run demo #12

Closed mm-ns closed 7 years ago

mm-ns commented 7 years ago

Hi there,

I tried to run the demo off the bat like you suggest npm run demo.ios.device and i get the following:

error TS6053: File 'node_modules/tns-platform-declarations/tns-core-modules/android17.d.ts' not found.
error TS6053: File 'node_modules/tns-platform-declarations/tns-core-modules/ios/ios.d.ts' not found.
error TS6053: File 'node_modules/tns-platform-declarations/tns-core-modules/org.nativescript.widgets.d.ts' not found.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! nativescript-directions@1.0.5 build: `tsc`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the nativescript-directions@1.0.5 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/manuelmaestrini/.npm/_logs/2017-07-09T01_50_15_572Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! nativescript-directions@1.0.5 preparedemo: `npm run build && cd demo && tns plugin remove nativescript-directions && tns plugin add .. && tns install`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the nativescript-directions@1.0.5 preparedemo script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/manuelmaestrini/.npm/_logs/2017-07-09T01_50_15_600Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! nativescript-directions@1.0.5 demo.ios.device: `npm run preparedemo && cd demo && tns run ios`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the nativescript-directions@1.0.5 demo.ios.device script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/manuelmaestrini/.npm/_logs/2017-07-09T01_50_15_628Z-debug.log

Any idea what is the issue?

I tried to run the demo directly from the demo folder, by following what in a closed issue here was outlined by removing the directions package, re installing it and running then the app. All worked until the app loaded. It crashed immediately and the error output is


Successfully synced application com.nordsense.waste-realtime on device 9368C117-25DB-4481-8AA0-A055B0B11BB6.

1   0x10c2238d7 -[TNSRuntime executeModule:]
2   0x10bdbc532 main
3   0x11013065d start
file:///app/app.js:3:26: JS ERROR Error: Could not find module 'application'. Computed path '/Users/manuelmaestrini/Library/Developer/CoreSimulator/Devices/9368C117-25DB-4481-8AA0-A055B0B11BB6/data/Containers/Bundle/Application/AC229060-7CA9-47A3-9471-6157787F51F6/demo.app/app/tns_modules/application'.
Jul  9 05:13:34 Manuels-MacBook-Pro-4 com.apple.CoreSimulator.SimDevice.9368C117-25DB-4481-8AA0-A055B0B11BB6.launchd_sim[56930] (UIKitApplication:com.xxxx.xxxx[0x89fe][56952][57226]): Service exited due to Segmentation fault: 11 ```
EddyVerbruggen commented 7 years ago

Let me update the demo.

EddyVerbruggen commented 7 years ago

Updated all dependencies, not the implementation. Should work nicely with {N} 3.x now.

mm-ns commented 7 years ago

Should I run it with npm run demo.ios.device (and in which folder, root or demo folder) or in the demo folder with tns run ios ?

EddyVerbruggen commented 7 years ago
mm-ns commented 7 years ago

Thanks but the moment I run npm run setup I get

npm ERR! code ENOLOCAL
npm ERR! Could not install from "../../../../../../../../eddyverbruggen/sandboxes/nativescript-directions" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/manuelmaestrini/.npm/_logs/2017-07-09T14_54_31_139Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nativescript-directions@1.0.6 setup: `npm i && cd demo && npm i && cd .. && npm run build && cd demo && tns plugin add .. && cd ..`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the nativescript-directions@1.0.6 setup script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/manuelmaestrini/.npm/_logs/2017-07-09T14_54_31_171Z-debug.log
EddyVerbruggen commented 7 years ago

Please clone again, or change this line in your local copy.

mm-ns commented 7 years ago

sorry to bother you again.

Still issues

npm WARN demo No description
npm WARN demo No repository field.
npm WARN demo No license field.

+ nativescript-directions@1.0.6
updated 1 package in 0.87s

The plugin .. is already installed
Path must be a string. Received undefined
# plugin add

┌─────────┬───────────────────────────┐
│ Usage   │ Synopsis                  │
│ General │ $ tns plugin add <Plugin> │
└─────────┴───────────────────────────┘

Installs the specified plugin and any packages that it depends on.

### Attributes

    * <Plugin> is a valid NativeScript plugin, specified by any of the following.
        * A <Name> or <Name>@<Version> where <Name> is the name of a plugin that is published in the npm registry and <Version> is a valid version of this plugin.
        * A <Local Path> to the directory which contains the plugin, including its package.json file.
        * A <Local Path> to a .tar.gz archive containing a directory with the plugin and its package.json file.
        * A <URL> which resolves to a .tar.gz archive containing a directory with the plugin and its package.json file.
        * A <git Remote URL> which resolves to a .tar.gz archive containing a directory with the plugin and its package.json file.

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! nativescript-directions@1.0.6 setup: `npm i && cd demo && npm i && cd .. && npm run build && cd demo && tns plugin add .. && cd ..`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the nativescript-directions@1.0.6 setup script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/manuelmaestrini/.npm/_logs/2017-07-09T15_03_10_538Z-debug.log

if I try to run the npm run demo.ios command anyway, is of course prompts other errors

> nativescript-directions@1.0.6 demo.ios /Users/manuelmaestrini/Dropbox/Programming/NordSense Software/Mobile/Nativescript/nativescript-directions
> npm run preparedemo && cd demo && tns run ios

> nativescript-directions@1.0.6 preparedemo /Users/manuelmaestrini/Dropbox/Programming/NordSense Software/Mobile/Nativescript/nativescript-directions
> npm run build && cd demo && tns plugin remove nativescript-directions && tns plugin add .. && tns install

> nativescript-directions@1.0.6 build /Users/manuelmaestrini/Dropbox/Programming/NordSense Software/Mobile/Nativescript/nativescript-directions
> tsc

directions.ios.ts(2,24): error TS2307: Cannot find module 'utils/utils'.
references.d.ts(1,1): error TS6053: File '/Users/manuelmaestrini/Dropbox/Programming/NordSense Software/Mobile/Nativescript/nativescript-directions/node_modules/tns-core-modules/tns-core-modules.d.ts' not found.
references.d.ts(3,1): error TS6053: File '/Users/manuelmaestrini/Dropbox/Programming/NordSense Software/Mobile/Nativescript/nativescript-directions/node_modules/tns-platform-declarations/ios.d.ts' not found.
references.d.ts(4,1): error TS6053: File '/Users/manuelmaestrini/Dropbox/Programming/NordSense Software/Mobile/Nativescript/nativescript-directions/node_modules/tns-platform-declarations/android.d.ts' not found.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nativescript-directions@1.0.6 build: `tsc`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the nativescript-directions@1.0.6 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/manuelmaestrini/.npm/_logs/2017-07-09T15_03_38_443Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nativescript-directions@1.0.6 preparedemo: `npm run build && cd demo && tns plugin remove nativescript-directions && tns plugin add .. && tns install`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the nativescript-directions@1.0.6 preparedemo script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/manuelmaestrini/.npm/_logs/2017-07-09T15_03_38_481Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nativescript-directions@1.0.6 demo.ios: `npm run preparedemo && cd demo && tns run ios`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the nativescript-directions@1.0.6 demo.ios script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/manuelmaestrini/.npm/_logs/2017-07-09T15_03_38_515Z-debug.log
EddyVerbruggen commented 7 years ago

Forget it, just start a new project and add the plugin as usual: tns plugin add nativescript-directions.