EddyVerbruggen / nativescript-localize

Internationalization plugin for NativeScript using native capabilities of each platform
MIT License
79 stars 31 forks source link

Path must be a string. Received undefined #64

Closed xlmnxp closed 5 years ago

xlmnxp commented 5 years ago

when I try build my ios project I got "Path must be a string. Received undefined" after called "before-checkForChanges/nativescript-localize.js"

mennolp098 commented 5 years ago

Same here, trying to build for iOS gives error Path must be a string. Received undefined.

kenherbert commented 5 years ago

Happens for me too - both on Android & iOS in a NativeScript-Vue project.

I'm not even trying to use any functionality of the library yet, this happens just from adding

import { localize } from "nativescript-localize";
Vue.filter("L", localize);

to app.js

lfabreges commented 5 years ago

I updated demos to NS 5.2 and added a Vue.js demo and it works, can one of you give me the steps or a repo to reproduce the issue ?

xlmnxp commented 5 years ago

@lfabreges come when you build project to iOS

lfabreges commented 5 years ago

@xlmnxp I built the demos locally for iOS. Travis did too and it worked : https://travis-ci.org/lfabreges/nativescript-localize. I may be missing something but for now I'll need more info.

lfabreges commented 5 years ago

Could you try removing hooks, node_modules and platforms directories, running npm i and try again building your app for iOS ?

xlmnxp commented 5 years ago

@lfabreges I tried and same issue come from your plugin hook I don't know why :(

mennolp098 commented 5 years ago

@lfabreges Just tried a clean project with the only exception to importing and adding localize as filter. It still gives me the error of path undefined.

Steps I did: NS-Sidekick -> new project -> Nativescript-Vue blank project -> add plugin -> Nativescript-Localize -> Import localize method into app.js -> Add Vue filter into app.js -> build app for iOS.

xlmnxp commented 5 years ago

@mennolp098 I tried nativescript-i18n and it's work fine after last update

lfabreges commented 5 years ago

@mennolp098 Here's what I tried:

NS Sidekick New NS Vue Blank project Added nativescript-localize plugin import localize and add filter into app.js Build app for iOS

It worked, I tried a local build and a cloud build. I then added an i18n folder with an en.default.json file in it and it worked too.

I'm using MacOSX, NS version 5.2, NodeJS 11.10

What are you using ? Are there any steps that you did not mention in your post (even small steps) ?

Thx.

xlmnxp commented 5 years ago

@lfabreges I'm using NativeScript SideKick with clean build

mennolp098 commented 5 years ago

@lfabreges Seems like you did the exact same steps as I did. The only difference between us is that I am using Node v8.8.1

lfabreges commented 5 years ago

Found the bug, tough one, it should work now using 4.1.1