func new function produces error when global yo is installed
See original GitHub issueRepro steps
Provide the steps required to reproduce the problem
- Install packages
npm install -g yo generator-azurefunctions azure-functions-cli
- Create new function app and function
mkdir foo
cd foo
func init
func new function foofunc
Expected behavior
The function foofunc should be created.
Actual behavior
module.js:442
throw err;
^
Error: Cannot find module 'C:\Users\adrianha\AppData\Roaming\npm\node_modules\azure-functions-cli\node_modules\yo\lib\cl
i.js'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.runMain (module.js:575:10)
at run (bootstrap_node.js:352:7)
at startup (bootstrap_node.js:144:9)
at bootstrap_node.js:467:3
Tip: run `func run <functionName>` to run the function.
Known workarounds
Use yo azurefunctions
instead of func new function
Related information
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
npm - yo - yeoman-environment/generator error
I am new to yeoman and related stuff. Just followed guidelines to install yo and generator-code. Wasn't that enough?
Read more >Custom functions quick start - Office Add-ins
To install these tools globally, run the following command via the command prompt. command line. Copy. npm install -g yo generator- ...
Read more >Firebase error type. initializeApp(options: DefaultFi To get th
In project web folder create a new file firebase-messaging-sw. ... I went into functions and ran npm install --save firebase and the deploy...
Read more >Universal Cyclopd̆ia and Atlas
( 1 ) x Replace by a new quantity , x ' , thus : x = x ' — } a ....
Read more >American Lumberman
An interesting feature of the morning session was the roll call ... comprise the functions of a national association without jeopardizing its own...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jthake This is a separate issue - probably related to your node version - Yeoman requires minimal version of node. What version of node do you have installed? (Tip: Upgrade to node 6.x LTS and try again).
Will be handled by fix for https://github.com/Azure/azure-webjobs-sdk-script/issues/856, closing this issue as we’re going to revisit the yeoman dependency.