Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Error during npm run build or setup #78

Closed
FranciZ opened this issue Mar 2, 2018 · 5 comments
Closed

Error during npm run build or setup #78

FranciZ opened this issue Mar 2, 2018 · 5 comments

Comments

@FranciZ
Copy link

FranciZ commented Mar 2, 2018

Hi,

following the build descriptions I get the following error when doing the npm build or npm setup in root.

error TS6053: File '/Users/[user]/projects/nativescript-plugins/nativescript-cardview/references.d.ts' not found.

Running the tns run android produces the below error:

Error is: Processing node_modules failed. Error: cp: cannot create directory '/Users/[user]/projects/nativescript-plugins/nativescript-cardview/demo/platforms/android/app/src/main/assets/app/tns_modules': No such file or directory.

tns version: 3.4.0
tsc version: 2.4.2

Help appreciated! Thanks!

@bradmartin
Copy link
Collaborator

Did you try tns build android, not sure what npm build is trying to do in the NS context here to be honest.

@FranciZ
Copy link
Author

FranciZ commented Mar 3, 2018

Hey, sorry. Mistyped. The commands are npm run build and npm run setup.

@FranciZ FranciZ changed the title Error during npm build or setup Error during npm run build or setup Mar 3, 2018
@chuckmitchell
Copy link

chuckmitchell commented Apr 6, 2018

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      

@chuckmitchell
Copy link

chuckmitchell commented Apr 6, 2018

I found this issue with a similar problem and got the demo to work by downgrading to NPM 4.
NativeScript/nativescript-cli#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.

@bradmartin
Copy link
Collaborator

The scripts in src directory should be cleaned up and working now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants