Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload function does not work on windows #2210

Open
NielsRavn opened this issue Nov 14, 2024 · 0 comments
Open

Upload function does not work on windows #2210

NielsRavn opened this issue Nov 14, 2024 · 0 comments

Comments

@NielsRavn
Copy link

I cannot run the upload command in the movie test scenario from a windows machine.

I get the following error:
image

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.

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'

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant