Closed FranciZ closed 6 years ago
Did you try tns build android
, not sure what npm build
is trying to do in the NS context here to be honest.
Hey, sorry. Mistyped. The commands are npm run build
and npm run setup
.
Hi, I'm having the same issue. I followed the Demo instructions and I'm getting errors. https://github.com/bradmartin/nativescript-cardview/blob/master/CONTRIBUTING.md
npm install
> husky@0.13.4 install /Users/charles/projects/nativescript/nativescript-cardview/node_modules/husky
> node ./bin/install.js
husky
setting up hooks
done
> lint-staged@3.6.1 postinstall /Users/charles/projects/nativescript/nativescript-cardview/node_modules/lint-staged
> echo "🚫💩 lint-staged installed!
Do not forget to configure it. See https://github.com/okonet/lint-staged/blob/master/README.md" && exit 0
🚫💩 lint-staged installed!
Do not forget to configure it. See https://github.com/okonet/lint-staged/blob/master/README.md
npm notice created a lockfile as package-lock.json. You should commit this file.
added 90 packages from 47 contributors in 8.469s
npm run build
> nativescript-cardview@2.0.5 build /Users/charles/projects/nativescript/nativescript-cardview
> tsc
error TS6053: File '/Users/charles/projects/nativescript/nativescript-cardview/references.d.ts' not found.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! nativescript-cardview@2.0.5 build: `tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the nativescript-cardview@2.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/charles/.npm/_logs/2018-04-06T16_11_12_543Z-debug.log
When I continue and try to run the demo I get this error:
tns run android
Searching for devices...
Executing before-prepare hook from /Users/charles/projects/nativescript/nativescript-cardview/demo/hooks/before-prepare/nativescript-dev-typescript.js
Found peer TypeScript 2.8.1
Preparing project...
Unable to apply changes on device: 2b442c4c1a92d5f1. Error is: Processing node_modules failed. Error: cp: cannot create directory '/Users/charles/projects/nativescript/nativescript-cardview/demo/platforms/android/app/src/main/assets/app/tns_modules': No such file or directory.
Executing after-watch hook from /Users/charles/projects/nativescript/nativescript-cardview/demo/hooks/after-watch/nativescript-dev-typescript.js
tns info
All NativeScript components versions information
nativescript 3.4.3
tns-core-modules 3.4.1
tns-android 3.4.1
tns-ios 3.4.1
I found this issue with a similar problem and got the demo to work by downgrading to NPM 4.
https://github.com/NativeScript/nativescript-cli/issues/3028
npm i -g npm@4
If I can figure out how to fix this project for NPM 5 I'll create a pull request.
The scripts in src
directory should be cleaned up and working now.
Hi,
following the build descriptions I get the following error when doing the
npm build
ornpm setup
in root.Running the
tns run android
produces the below error:tns version: 3.4.0 tsc version: 2.4.2
Help appreciated! Thanks!