NativeScript / nativescript-marketplace-demo

NativeScript kitchen sink demo. All of NativeScript’s functionality in one app.
http://www.nativescript.org
Apache License 2.0
325 stars 97 forks source link

Fails to install/run: can't find node_modules/tns-android//framework/libs #286

Closed KirilOkun closed 6 years ago

KirilOkun commented 6 years ago

Just cloned and tried to run this app but it keeps failing with

`Error: cp: no such file or directory: /.../nativescript-marketplace-demo/node_modules/tns-android/framework/libs

Also tried doing a tns install and tns build android with the same result. I was able to build and run a few other example apps without any issues. Any ideas as to what to do to get it up and running.?

It sure looks like the NativeScript team had put a lot of effort into building this app to help new developers to come up to speed quickly. Makes things a lot more difficult and frustrating when even the example by the core team has such basic problems.

`

sushant-j commented 6 years ago

Upvoted as I am facing the same issue.

I'm getting following errors on console:

Searching for devices...
Copying template files...
Installing  tns-android
/home/sushant/ns-projects/nativescript-marketplace-demo
+-- tns-android@4.0.0-2017-12-19-05 
+-- UNMET PEER DEPENDENCY tns-core-modules@4.0.0-2017-12-20-01 invalid
`-- UNMET PEER DEPENDENCY webpack@3.10.0
sushant-j commented 6 years ago

Update: I was able to run the project for Android by changing dependency versions in package.json to following:

"nativescript": {
    "id": "org.nativescript.examples",
    "tns-ios": {
      "version": "3.5.0-2017-12-20-02"
    },
    "tns-android": {
      "version": "3.3.1"
    }
  },
"dependencies": {
     .
     .
    "nativescript-pro-ui": "^3.2.0",
    "tns-core-modules": "3.3.0"
     .
     .
}

Also, I removed webpack, webpack-bundle-analyzer and webpack-sources from devDependencies as I don't need to build the examples demo for prod. I suppose you could use npm i -g webpack to install them if you need to.

KirilOkun commented 6 years ago

thanks @sushant-j your changes solved the problem for me as wel. i was able to run the appl