Error when using custom directories, still tries to interact with default resources folder
Opened this issue ยท 1 comments
alexcroox commented
Using:
--icon ./automation/native-app-resources/silo/icon.png
--splash ./automation/native-app-resources/silo/splash.png
--outputdir ./automation/native-app-resources/silo
--transform-splash cover --outputdir
npx capacitor-resources --icon ./automation/native-app-resources/silo/icon.png --splash ./automation/native-app-resources/silo/splash.png --transform-splash cover --outputdir ./automation/native-app-resources/silo
๐ฆ Capacitor Resources v2.0.5
-----------------------------
Checking files and directories...
โ Processing files for all platforms
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
โ Icon file ok (1024x1024)
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
โ Splash file ok (2732x2732)
โ Output directory ok (./automation/native-app-resources/silo)
Generating files...
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
โ Generated icon files for android
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
โ Generated splash files for android
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
โ Generated icon files for ios
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
โ Generated splash files for ios
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
โ Generated icon files for windows
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
โ Generated splash files for windows
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
(node:40954) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
โ Generated icon files for blackberry10
โ Successfully generated all files
Root path: /Users/alex/Projects/silo
(node:40984) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, scandir '/Users/alex/Projects/silo/resources/android/icon'
at Object.readdirSync (fs.js:871:3)
at klawSync (/Users/alex/Projects/silo/node_modules/klaw-sync/klaw-sync.js:13:25)
at /Users/alex/Projects/silo/node_modules/capacitor-resources/src/copy/platforms/android/index.js:26:21
at new Promise (<anonymous>)
at getAndroidIcons (/Users/alex/Projects/silo/node_modules/capacitor-resources/src/copy/platforms/android/index.js:24:10)
at copyAndroidIcons (/Users/alex/Projects/silo/node_modules/capacitor-resources/src/copy/platforms/android/index.js:39:23)
at /Users/alex/Projects/silo/node_modules/capacitor-resources/src/copy/platforms/android/index.js:106:13
at new Promise (<anonymous>)
at Object.<anonymous> (/Users/alex/Projects/silo/node_modules/capacitor-resources/src/copy/platforms/android/index.js:103:18)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
(node:40984) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:40984) [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.
----------------------------------------------
๐ฆ Capacitor resources generated successfully!
Root path: /Users/alex/Projects/silo
(node:40988) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, scandir '/Users/alex/Projects/silo/resources/ios/icon'
at Object.readdirSync (fs.js:871:3)
at klawSync (/Users/alex/Projects/silo/node_modules/klaw-sync/klaw-sync.js:13:25)
at /Users/alex/Projects/silo/node_modules/capacitor-resources/src/copy/platforms/ios/index.js:26:21
at new Promise (<anonymous>)
at getIOSIcons (/Users/alex/Projects/silo/node_modules/capacitor-resources/src/copy/platforms/ios/index.js:24:10)
at copyIOSIcons (/Users/alex/Projects/silo/node_modules/capacitor-resources/src/copy/platforms/ios/index.js:35:23)
at /Users/alex/Projects/silo/node_modules/capacitor-resources/src/copy/platforms/ios/index.js:80:13
at new Promise (<anonymous>)
at Object.<anonymous> (/Users/alex/Projects/silo/node_modules/capacitor-resources/src/copy/platforms/ios/index.js:77:18)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
(node:40988) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:40988) [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.
alexcroox commented
I believe the issue lies with this hardcoded resources path: https://github.com/leonardoquevedox/capacitor-resources/blob/master/src/copy/platforms/ios/index.js#L15