Home > OS >  npm install The filename, directory name, or volume label syntax is incorrect
npm install The filename, directory name, or volume label syntax is incorrect

Time:12-15

I am trying to set up a basic Azure Functions Local Environment by following instructions here, however, after reaching the step and try to run it F5 I get following error in the terminal.

> Executing task: npm install <
The filename, directory name, or volume label syntax is incorrect.

I havent even changed anything, and its all just basic code and configurations.

My node path C:\Program Files\nodejs is already added to PATH in environment variables.

Any idea what this error could be about? TIA!

CodePudding user response:

I tried to reproduce the issue by following the same documentation provided in the question.

  1. Created a workspace folder for the azure function in my local environment : C:\Users\surya\source\repos\suryanodejsazfunctionapp
  2. Open VS Code > Click on Azure function extension > Click on new project - It will ask you to choose the workspace path in which i have chosen the above path.
  3. Selected Java Script Language > HTTP trigger template and the authorization level as anonymous
  4. By default, some boiler plate code is created by VS code and executed using F5 command enter image description here

NOTE :

  1. Check Azure function core tools version using func version and node version using node --version (Download node 14 or 16 and AZ function core tools 3 or 4v)

The filename, directory name, or volume label syntax is incorrect.

For the above error, please check through this SO thread

  • Related