System Information
- Strapi Version: 4.12.5
- Operating System: Linux
- Database: Mysql
- Node Version: 18.17.1
- NPM Version: 9.6.7
- Yarn Version: 1.22.19
Hi everyone,
i’m facing an error after importing a backup file created by “yarn strapi export --no-encrypt --file my-strapi-export” … see trace below: input: ‘/uploads/tca_hb_de6f6d7a7f.mp4’, code: ‘ERR_INVALID_URL’
I can also see that the root folder of “Media Library” is not in sync with the “uploads” folder after the import…only 7 assets out of approx 100 assets. The “folder” are looking ok.
Can someone help? thanks!
Command: yarn strapi import -f my-strapi-export.tar.gz
$ strapi export --no-encrypt --file my-strapi-export1
Starting export…
- schemas: 0 transfered (size: 0) (elapsed: 0 ms)
(node:82) Warning: [deprecated] In future versions, Strapi will stop reading directly from the environment variable API_TOKEN_SALT. Please set apiToken.salt in config/admin.js instead.
For security reasons, keep storing the secret in an environment variable and use env() to read it in config/admin.js (ex:apiToken: { salt: env('API_TOKEN_SALT') }
). See Environment variables | Strapi Documentation.
(Usenode --trace-warnings ...
to show where the warning was created)
(node:82) Warning: Missing transfer.token.salt: Data transfer features have been disabled.
Please set transfer.token.salt in config/admin.js (ex: you can generate one using Node withcrypto.randomBytes(16).toString('base64')
)
For security reasons, prefer storing the secret in an environment variable and read it in config/admin.js.
schemas: 42 transfered (size: 42.8 KB) (elapsed: 12 ms)
- entities: 0 transfered (size: 0) (elapsed: 0 ms)
entities: 411 transfered (size: 363.8 KB) (elapsed: 162 ms)
- assets: 0 transfered (size: 0) (elapsed: 0 ms)
node:events:492
throw er; // Unhandled ‘error’ event
^
TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:405:5)
at new URL (node:internal/url:611:13)
at request (node:https:346:32)
at Object.get (node:https:392:15)
at /opt/node_modules/@strapi/data-transfer/dist/strapi/providers/local-source/assets.js:35:14
at new Promise ()
at getFileStats (/opt/node_modules/@strapi/data-transfer/dist/strapi/providers/local-source/assets.js:33:12)
at generator (/opt/node_modules/@strapi/data-transfer/dist/strapi/providers/local-source/assets.js:66:33)
at async next (node:internal/streams/from:85:11)
Emitted ‘error’ event on Duplexify instance at:
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
input: ‘/uploads/tca_hb_de6f6d7a7f.mp4’,
code: ‘ERR_INVALID_URL’
}
Node.js v18.17.1
error Command failed with exit code 1.
info Visit yarn run | Yarn for documentation about this command.