ionic-cli icon indicating copy to clipboard operation
ionic-cli copied to clipboard

TypeError: Path must be a string. Received undefined

Open zindelluib opened this issue 9 years ago • 19 comments

I upgraded my ionic version and an error appears when I run it in Windows cmd

TypeError: Path must be a string. Received undefined at assertPath (path.js:7:11) at Object.resolve (path.js:186:7) at Project.BaseConfig (C:\Users\zindel\AppData\Roaming\npm\node_modules\ioni c\node_modules@ionic\cli-utils\dist\lib\config.js:27:30) at Project (C:\Users\zindel\AppData\Roaming\npm\node_modules\ionic\node_modu les@ionic\cli-utils\dist\lib\project.js:25:1) at C:\Users\zindel\AppData\Roaming\npm\node_modules\ionic\dist\index.js:54:2 5 at next (native) at fulfilled (C:\Users\zindel\AppData\Roaming\npm\node_modules\ionic\dist\in dex.js:4:58)

When I try to ionic serve this appears [ERROR] Error occurred while loading plugins. CLI functionality may be limited. Checking for CLI updates now... [ERROR] No updates found after plugin error--please report this issue.

Ionic Version : 3.0.0 Cordova : 7.0.0 Node Version : 6.10.3 NPM : 4.5.0

zindelluib avatar May 10 '17 10:05 zindelluib

Herre is @Petruccini 's forum post with additional information: https://forum.ionicframework.com/t/typeerror-path-must-be-a-string-received-undefined/89647

janpio avatar May 10 '17 13:05 janpio

@zindelluib Does ionic info work for you?

imhoffd avatar May 10 '17 17:05 imhoffd

the same issue $ ionic -v TypeError: Path must be a string. Received undefined at assertPath (path.js:7:11) at Object.resolve (path.js:186:7) at Project.BaseConfig (C:\Users\Administrator\AppData\Roaming\nvm\v6.10.0\node_modules\ionic\node_modules\@ionic\cli-utils\dist\lib\config.js:27:30) at Project (C:\Users\Administrator\AppData\Roaming\nvm\v6.10.0\node_modules\ionic\node_modules\@ionic\cli-utils\dist\lib\project.js:25:1) at C:\Users\Administrator\AppData\Roaming\nvm\v6.10.0\node_modules\ionic\dist\index.js:54:25 at next (native) at fulfilled (C:\Users\Administrator\AppData\Roaming\nvm\v6.10.0\node_modules\ionic\dist\index.js:4:58)

c350156378 avatar May 11 '17 02:05 c350156378

I am getting the same issue while creating a project

techhunting avatar May 11 '17 03:05 techhunting

@techhunting @c350156378 @zindelluib All on Windows 10?

imhoffd avatar May 11 '17 04:05 imhoffd

@dwieeb win7 32bit upgrade to 2.2.3, works again.

`$ ionic info

Your system information:

Cordova CLI: 7.0.0 Ionic Framework Version: 3.1.1 Ionic CLI Version: 2.2.3 Ionic App Lib Version: 2.2.1 Ionic App Scripts Version: 1.3.6 ios-deploy version: Not installed ios-sim version: Not installed OS: Windows 7 Node Version: v6.10.0 Xcode version: Not installed `

c350156378 avatar May 11 '17 04:05 c350156378

@dwieeb Windows 8.1

zindelluib avatar May 11 '17 10:05 zindelluib

@zindelluib We're not able to reproduce this on our Windows machine, but I may have found the offending line. Can you try with the latest alpha version? npm i -g ionic@canary

imhoffd avatar May 11 '17 17:05 imhoffd

@dwieeb I got the same error and tried the latest alpha vesion -> didn't work. I reinstalled my whole environment completely new just a few hours ago and got the error since then.

ionic v3.0.0 and 3.0.0-alpha.256503ea cordova 7.0.0 and newest nodejs v7.10.0 (if that matters?)

Jigglypow avatar May 11 '17 18:05 Jigglypow

@dwieeb I just reverted version to 2.2.3

zindelluib avatar May 12 '17 05:05 zindelluib

@dwieeb uninstall the current and install the ionic@canary and it works `$ ionic info [WARN] You are not in an Ionic project directory. Project context may be missing.

global packages:

@ionic/cli-utils : 1.0.0-alpha.8fcb0a8d
Ionic CLI        : 3.0.0-alpha.8fcb0a8d

System:

Node       : v6.10.0
OS         : Windows 7
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed

`

c350156378 avatar May 12 '17 05:05 c350156378

Getting the same error while creating new project ot ionic -v or ionic info

Plz help find a solution asap

nagarajusomalraju avatar May 12 '17 08:05 nagarajusomalraju

Guys, please! Let's keep it simple! Noob's asking.

What's the solution for the following problem? I've ran the commands "ionic serve" and"ionic -info" in my Git CLI.

The output, and I quote, is: " [ERROR] Error occurred while loading plugins. CLI functionality may be limited. Checking for CLI updates now... [ERROR] No updates found after plugin error--please report this issue. global packages: @ionic/cli-utils : 1.0.0 Ionic CLI : 3.0.0 System: Node : v7.9.0 OS : Windows 10 Xcode : not installed ios-deploy : not installed ios-sim : not installed " End quote.

image

Thank you!

LeandroBernardino avatar May 12 '17 19:05 LeandroBernardino

@LeandroBernardino Your problem is totally different from the one you responded to (different error message) and probably solved by following this: https://github.com/driftyco/ionic-cli#existing-project

janpio avatar May 12 '17 19:05 janpio

@piotrowski as u've seen, i'm no good reader also. Srry. I'll give it a try. Tks!

LeandroBernardino avatar May 12 '17 19:05 LeandroBernardino

I have the same error when i tried to create new ionic project :

TypeError: Path must be a string. Received undefined at assertPath (path.js:7:11) at Object.resolve (path.js:186:7)

Please can you advice how to fix this error .

Best regards

AnasAl-qudah avatar May 13 '17 12:05 AnasAl-qudah

I have the same error with all the ionic cli commands after I upgraded ionic to the latest version. Currently I have downgraded the ionic to v2.2.3. Hope for a fix soon. Thanks in advance.

lucifer-AM avatar May 15 '17 13:05 lucifer-AM

Hi @dwieeb In what folder I can change this files? I got the same problem

tocanto avatar May 15 '17 21:05 tocanto

@tocanto If you want to try using the alpha CLI with this fix in it: npm i -g ionic@canary

imhoffd avatar May 15 '17 22:05 imhoffd