Для форматирования даты я попытался загрузить date-fns через: npm install date-fns --save
Не удалось установить, и я получил следующие предупреждения и ошибки:
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated core-js@1.2.7: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated babel-preset-expo@8.1.1: 8.1.1 mistakenly contains the contents of 8.2.1; use that version instead
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated intl-relativeformat@2.2.0: This package has been deprecated, please see migration guide at 'https://github.com/formatjs/formatjs/tree/master/packages/intl-relativeformat#migration-guide'
npm WARN deprecated @hapi/joi@15.1.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated deep-assign@3.0.0: Check out `lodash.merge` or `merge-options` instead.
npm WARN rm not removing C:\Users\kanch\Documents\ReactNative\confusion\node_modules\.bin\rimraf.cmd as it wasn't installed by C:\Users\kanch\Documents\ReactNative\confusion\node_modules\rimraf
npm WARN rm not removing C:\Users\kanch\Documents\ReactNative\confusion\node_modules\.bin\rimraf as it wasn't installed by C:\Users\kanch\Documents\ReactNative\confusion\node_modules\rimraf
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^2.1.2 (node_modules\jest-haste-map\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\metro\node_modules\jest-haste-map\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\metro-core\node_modules\jest-haste-map\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\metro\node_modules\jest-haste-map\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN react-native-elements@2.0.2 requires a peer of react-native-vector-icons@>6.6.0 but none is installed. You must install peer dependencies yourself.
npm ERR! Maximum call stack size exceeded
После этого я оставил его там и сохранил приложение без форматирования даты и попыталось запустить yarn start
, в результате чего я получил следующий результат:
throw err;
^
Error: Cannot find module 'nice-try'
Require stack:
- C:\Users\kanch\Documents\ReactNative\confusion\node_modules\expo\node_modules\cross-spawn\lib\parse.js
- C:\Users\kanch\Documents\ReactNative\confusion\node_modules\expo\node_modules\cross-spawn\index.js
- C:\Users\kanch\Documents\ReactNative\confusion\node_modules\expo\bin\cli.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1029:15)
at Function.Module._load (internal/modules/cjs/loader.js:898:27)
at Module.require (internal/modules/cjs/loader.js:1089:19)
at require (internal/modules/cjs/helpers.js:73:18)
at Object.<anonymous> (C:\Users\kanch\Documents\ReactNative\confusion\node_modules\expo\node_modules\cross-spawn\lib\parse.js:4:17)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14)
at Module.require (internal/modules/cjs/loader.js:1089:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\kanch\\Documents\\ReactNative\\confusion\\node_modules\\expo\\node_modules\\cross-spawn\\lib\\parse.js',
'C:\\Users\\kanch\\Documents\\ReactNative\\confusion\\node_modules\\expo\\node_modules\\cross-spawn\\index.js',
'C:\\Users\\kanch\\Documents\\ReactNative\\confusion\\node_modules\\expo\\bin\\cli.js'
]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Я не могу запустить сервер Metro и не могу найти nice-try
в моих node_modules. Какие-нибудь решения?