Skip to content

CLI will fail if the npm module path contains non-ascii characters #134

@eNeRGy164

Description

@eNeRGy164

I installed the CLI using npm i -g azure-functions-core-tools which installs it in my user profile using the following path: C:\Users\Michaël\AppData\Roaming\npm\node_modules\azure-functions-core-tools

When running func host start it fails with the following error:

module.js:457
    throw err;
    ^

Error: Cannot find module 'C:\Users\Micha�l\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\edge\double_edge.js'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.runMain (module.js:590:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

You can see it is encoding the path wrong.

Funny note: If I remove everything in the roaming folder the error does show the correct encoded path:
Error: Cannot find module 'C:\Users\Michaël\AppData\Roaming\npm\node_modules\azure-functions-core-tools\lib\main.js'

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