Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor - Capacitor Installation - Path must be a string. Received undefined #353

Closed
tonyawad88 opened this issue Mar 19, 2018 · 3 comments
Closed

Comments

@tonyawad88
Copy link

Hello,

I was trying to add capacitor to a brand new ionic project --blank template, and I keep getting "Path must be a string. Received undefined", even though the command seems to run to completion.

Here's the commands that keep printing that message:

Node version: 8.9.4
NPM version: 5.7.1

Command 1:

npx cap init myApp com.abc.myapp

Output:

npx: installed 1 in 1.765s
Path must be a string. Received undefined
C:\Prototypes\ionic2\capacitor-test\node_modules\@capacitor\cli\bin\capacitor
√ Initializing Capacitor project in C:\Prototypes\ionic2\capacitor-test in 2.48ms


*   Your Capacitor project is ready to go!  *

Add platforms using "npx cap add":

  npx cap add android
  npx cap add ios
  npx cap add electron

Follow the Developer Workflow guide to get building:
https://capacitor.ionicframework.com/docs/basics/workflow

Command 2:

npx cap add android

Output:

npx: installed 1 in 1.75s
Path must be a string. Received undefined
...\capacitor-test\node_modules\@capacitor\cli\bin\capacitor
√ Adding native android project in: ...\capacitor-test\android in 59.59ms
- Syncing GradleCreating local properties ...\Library\Android\sdk
√ Syncing Gradle in 698.89μp
√ add in 65.00ms
√ Copying web assets from www to android\app\src\main\assets\public in 26.65ms
√ Copying native bridge in 1.80ms
√ Copying capacitor.config.json in 12.60ms
Found 3 Cordova plugin(s):
  cordova-plugin-device
  cordova-plugin-splashscreen
  cordova-plugin-whitelist
√ copy in 109.51ms
√ Fetching plugins in 10.48ms
Found 3 Cordova plugin(s):
  cordova-plugin-device
  cordova-plugin-splashscreen
  cordova-plugin-whitelist
Found 0 Capacitor plugin(s):

√ update android in 33.13ms
@mlynch
Copy link
Contributor

mlynch commented Mar 19, 2018

I believe this is an npx/node bug on windows. Closing and will monitor this: zkat/npx#144

@mlynch mlynch closed this as completed Mar 19, 2018
@ronakganatra9
Copy link

Downloading latest node stable version from https://nodejs.org/en/ &
npm install -g fixed my issue.

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 13, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 13, 2022
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