Сбой сборки IOs - UnhandledPromiseRejectionWarning: TypeError: Невозможно прочитать свойство 'toLowerCase' из неопределенного - PullRequest
2 голосов
/ 24 сентября 2019

Со вчерашнего дня, когда я пытаюсь сделать сборку для iOs, она не будет успешной и выдает эту ошибку:

(node:3043) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toLowerCase' of undefined
    at /Users/username/Documents/petpo-fe-mobile-bugs/platforms/ios/cordova/lib/list-emulator-build-targets:54:45
    at Array.forEach (<anonymous>)
    at /Users/username/Documents/petpo-fe-mobile-bugs/platforms/ios/cordova/lib/list-emulator-build-targets:52:44
    at Array.reduce (<anonymous>)
    at /Users/username/Documents/petpo-fe-mobile-bugs/platforms/ios/cordova/lib/list-emulator-build-targets:50:57
    at Array.reduce (<anonymous>)
    at /Users/username/Documents/petpo-fe-mobile-bugs/platforms/ios/cordova/lib/list-emulator-build-targets:45:28
    at _fulfilled (/Users/username/Documents/petpo-fe-mobile-bugs/platforms/ios/cordova/node_modules/q/q.js:854:54)
    at /Users/username/Documents/petpo-fe-mobile-bugs/platforms/ios/cordova/node_modules/q/q.js:883:30
    at Promise.promise.promiseDispatch (/Users/username/Documents/petpo-fe-mobile-bugs/platforms/ios/cordova/node_modules/q/q.js:816:13)
(node:3043) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3043) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Я уже пытался вычеркнуть новый проект из git, удалить и переустановить модули, удалить и прочитать платформу в ionic, я не знаю, что еще я могпытаться.Пожалуйста, кто-нибудь может дать мне некоторое понимание этого вопроса?

Заранее спасибо.

1 Ответ

0 голосов
/ 25 сентября 2019

toLowerCase используется в plugins / cordova-plugin-ios-localized-strings / scripts / add_supported_languages.js?

Если да, то здесь значение не определено.

Пожалуйста, попробуйте выполнить: ionic build --prod

Если вы столкнулись с ошибкой -> В вашем коде есть проблема.

Если вы не столкнулись с ошибкой -> Проблема возникает, когдаcordova объединяет ваше приложение.

Если этот последний вариант, выполните из bash (не cmd): ionic cordova build ios --prod или попробуйте удалить и добавить свою платформу снова.

-С наилучшими пожеланиями.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...