nstudio / xplat

Cross-platform (xplat) tools for Nx workspaces.
MIT License
366 stars 52 forks source link

Could not install from "../../../libs/scss" as it does not contain a package.json file. #187

Closed Siafu closed 4 years ago

Siafu commented 4 years ago

Fresh install following along with the docs. I have no clue how to start the Nativescript application. I ran the following command npm run start.nativescript.mobile-tm.ios What am I doing wrong here?

image

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/Users/kambui.nurse/.nvm/versions/node/v13.3.0/bin/node',
1 verbose cli   '/Users/kambui.nurse/.nvm/versions/node/v13.3.0/bin/npm',
1 verbose cli   'run',
1 verbose cli   'start.nativescript.mobile-tm.ios'
1 verbose cli ]
2 info using npm@6.13.1
3 info using node@v13.3.0
4 verbose run-script [
4 verbose run-script   'prestart.nativescript.mobile-tm.ios',
4 verbose run-script   'start.nativescript.mobile-tm.ios',
4 verbose run-script   'poststart.nativescript.mobile-tm.ios'
4 verbose run-script ]
5 info lifecycle nera-apps@0.0.0~prestart.nativescript.mobile-tm.ios: nera-apps@0.0.0
6 info lifecycle nera-apps@0.0.0~start.nativescript.mobile-tm.ios: nera-apps@0.0.0
7 verbose lifecycle nera-apps@0.0.0~start.nativescript.mobile-tm.ios: unsafe-perm in lifecycle true
8 verbose lifecycle nera-apps@0.0.0~start.nativescript.mobile-tm.ios: PATH: /Users/kambui.nurse/.nvm/versions/node/v13.3.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/kambui.nurse/Projects/nera-apps/node_modules/.bin:/Library/PostgreSQL/11/bin:/Library/PostgreSQL/11/bin/:/Users/kambui.nurse/.fzf/bin:/Users/kambui.nurse/.nvm/versions/node/v13.3.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/Library/Frameworks/Mono.framework/Versions/Current/Commands
9 verbose lifecycle nera-apps@0.0.0~start.nativescript.mobile-tm.ios: CWD: /Users/kambui.nurse/Projects/nera-apps
10 silly lifecycle nera-apps@0.0.0~start.nativescript.mobile-tm.ios: Args: [
10 silly lifecycle   '-c',
10 silly lifecycle   'cd apps/mobile/nativescript-mobile-tm && tns debug ios --env.aot --no-hmr --emulator'
10 silly lifecycle ]
11 info lifecycle nera-apps@0.0.0~start.nativescript.mobile-tm.ios: Failed to exec start.nativescript.mobile-tm.ios script
12 verbose stack Error: nera-apps@0.0.0 start.nativescript.mobile-tm.ios: `cd apps/mobile/nativescript-mobile-tm && tns debug ios --env.aot --no-hmr --emulator`
12 verbose stack spawn ENOENT
12 verbose stack     at ChildProcess.<anonymous> (/Users/kambui.nurse/.nvm/versions/node/v13.3.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack     at ChildProcess.emit (events.js:219:5)
12 verbose stack     at maybeClose (internal/child_process.js:1027:16)
12 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:285:5)
13 verbose pkgid nera-apps@0.0.0
14 verbose cwd /Users/kambui.nurse/Projects/nera-apps
15 verbose Darwin 17.7.0
16 verbose argv "/Users/kambui.nurse/.nvm/versions/node/v13.3.0/bin/node" "/Users/kambui.nurse/.nvm/versions/node/v13.3.0/bin/npm" "run" "start.nativescript.mobile-tm.ios"
17 verbose node v13.3.0
18 verbose npm  v6.13.1
19 error code ELIFECYCLE
20 error syscall spawn
21 error file sh
22 error errno ENOENT
23 error nera-apps@0.0.0 start.nativescript.mobile-tm.ios: `cd apps/mobile/nativescript-mobile-tm && tns debug ios --env.aot --no-hmr --emulator`
23 error spawn ENOENT
24 error Failed at the nera-apps@0.0.0 start.nativescript.mobile-tm.ios script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]
NathanWalker commented 4 years ago

Hi @Siafu - this occurs if you generated a {N} app first without generating the shared code architecture. Run this if using Nrwl's nx cli:

nx g @nstudio/xplat:init --platforms nativescript

Optionally if you had setup your workspace with angular can run with angular cli:

ng g @nstudio/xplat:init --platforms nativescript

You can then run npm run clean.nativescript.mobile-tm

And should be good then, lemme know 👍

We'll add a note about this to the getting started docs soon.

Siafu commented 4 years ago

Thank you, running it now.

Siafu commented 4 years ago

Thank you, all is working now.