Data import fatal error on 4.6.0

fixed: Fatal error on import: Invalid schema changes detected during integrity checks

I have solved by editing a file in
node_modules\@strapi\data-transfer\lib\file\providers\source\index.js
on Line 144: const parts = path_1.default.relative('.', filePath).split(\\');
this problem was arising on windows because :

On Windows, file paths typically use backslashes as the path separator, whereas on Unix-based systems (such as macOS and Linux), file paths typically use forward slashes.
so filePath is schema/filename.jsonl in Line 144 split method search for / but something like schema\filename.jsonl is returned by path_1.default.relative() so filter never returns true, now it is splitting by \ and parts = [‘schema’,‘filename.jsonl’];

I have created a pull requested in which issue is [fixed]

1 Like