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

Writing nonce edge function to .netlify\edge-functions results in error on Windows Terminal, powershell #83

Open
brunel-pierrebakker opened this issue Oct 4, 2024 · 0 comments · May be fixed by #97

Comments

@brunel-pierrebakker
Copy link

Hi,

When building using the Netlify CLI ( netlif build command ) using Windows Terminal (powershell 7.4.5) it seems the `mkdir -p 'netlifypath' command in index.js fails. I tried it on a wsl (ubuntu) command shell and that seems to work fine. Running a normal npm run build of our code is working fine, but that probably because that doesn't trigger the plugin's prebuild script...

The error is get is:

❯ Loading plugins

  • @netlify/[email protected] from netlify.toml and package.json
    Current working directory: C:\repos\some\source\folder
    Writing nonce edge function to .netlify\edge-functions...
    A subdirectory or file -p already exists.
    Error occurred while processing: -p.
    the result:

It does create a folder with the name -p. Which is (path) parameter of the mkdir command in index.js.. so not sure why this is failing on windows terminal.. but it might be fixed if you remove that parameter from the command? mkdir will accept the path without the -p parameter on both windows and linux as far as i know..

Hope you can help
thnx

JakeChampion added a commit that referenced this issue Nov 8, 2024
JakeChampion added a commit that referenced this issue Nov 12, 2024
JakeChampion added a commit that referenced this issue Nov 12, 2024
JakeChampion added a commit that referenced this issue Nov 14, 2024
JakeChampion added a commit that referenced this issue Nov 14, 2024
JakeChampion added a commit that referenced this issue Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant