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

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

Closed
eNeRGy164 opened this issue May 9, 2017 · 3 comments
Closed

Comments

@eNeRGy164
Copy link

eNeRGy164 commented May 9, 2017

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'

@eNeRGy164
Copy link
Author

I've tried to trace the issue, and it seems it goes wrong when loading Edge.js.
When skipping the method DummyEdgeInit in the StartHostAction class the host launches without error.

@eNeRGy164
Copy link
Author

Seems an issue in EdgeJs.

Created a pull request with a workaround

@lindydonna
Copy link
Contributor

Closing as it's an Edge bug, not CLI. We'll merge the update to Edge when it's committed.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants