-
Notifications
You must be signed in to change notification settings - Fork 29
Description
I cannot run the upload command in the movie test scenario from a windows machine.
I figured out that its because the path in the manifest file has forward slashes, and the path fetched from the file system has backwards slash. If i change it contentful complains that im not following the correct regex.
create-contentful-app/packages/contentful--app-scripts/src/upload/validate-bundle.ts
Line 20 in f8c6659
| const files = fs.readdirSync(buildFolder, { recursive: true, encoding: 'utf-8' }); |
reads: 'functions\index.js'
on a windows machine and the check here looks for exact 'functions/index.js'
create-contentful-app/packages/contentful--app-scripts/src/upload/validate-bundle.ts
Line 40 in f8c6659
| const functionWithoutEntryFile = functions.find(({ path }) => !files.includes(path)); |
workaround for now is to run the upload command through a windows WSL ubuntu instalation.
for others with this issue you can enable wsl and run: wsl --install -d Ubuntu
then "cd /mnt/" eg "cd /mnt/d/testfiles"
