Skip to content

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

@brunel-pierrebakker

Description

@brunel-pierrebakker

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions