Path must be a string. Received undefined


#1

Hi Everyone,

I know this error is old and I have checked the forum posts around this as well as all the closed issues on github.
The problem started occurring when I cloned my repo to a Mac. I’m mostly working on Windows 10 for ionic projects but I have to sort out a very specific problem that suddenly reared its head on iOS 11… So Mac we go!

Anyways, I cloned the repo, npm installed everything, and then tried to do ionic cordova build ios, ionic cordove emulate ios, ionic cordova prepare ios and they all fail with the same error message : “Path must be a string. Received undefined”

Below are a few screenshots for additional information regarding the environment I’m working in, hopefully someone out there could help :slight_smile:

ionic info
image

ionic cordova build ios
image

Thanks in advance to anyone that answers !


#2

Just a side-note, I also tried removing the current ionic and installing ionic@canary via npm, which gave me the same error message anyways :frowning:


#3

Run the same command with --verbose.
Run the same command without ionic but --debugadded at the end.
Show us the output.


#4

Here you go @Sujan12


#5

Is the ionic info output identical on your Windows machine?


#6

The ionic info command on my windows pc looks like this :


#7

Very different cordova-ios version. Try to install the same one on your mac, maybe this solves the problem.


#8

I downgraded to ios 4.4.0 on the Mac and the exact same problem happens.
I want to add that the same error message appeared when installing ios 4.4.0 as well, this was the output of the terminal :


#9

Create a new project with ionic start please. Does it happen there as well? Can you build the project?
If not, the problem is with your project.
Maybe as a first step add your plugins to that new project and see if this causes the problem. Which one? The “istablet” one shown in your last command line output?


#10

ok thanks, good idea. I will test it out !


#11

Ok so that worked, a new ionic start can build fine on the mac, I will now go and add the istablet plugin to check if it is that one… I hope.


#12

Nope not that one, I guess I’ll have to add them one by one


#13

So i figured it out.
Ons the Mac the cordova version was 7.1.0, downgrading to cordova 6.5.0 made the problem go away…
Thanks for the help anyways !


#14

That’s not really a solution, but a temporary workaround. New versions aren’t released for fun, but because the fix bugs and problems in old versions. But great it works for you now .


#15

You reply does make some sense, but we had similar problems with android builds on cordova 7.1.0 on windows as well and decided to downgrade.
Whether the problem will re-occur later if/when we upgrade remains to be seen, perhaps we will be better skilled to solve the problem by then.
But thank you again for the assistance !