Closed stefaneidelloth closed 2 years ago
I'm not sure where you are seeing a generator requirement of Node 16 (it's not something we're imposing), but I can say that we are in the process of updating the templates to support Node 16 as we verify they work,
Note that this restriction is mostly so we can check that things don't break with new versions of node and npm (which has happened in the past) before publishing them that way. We will also be sticking to LTS branches of node/npm which are the even numbered versions. You can remove the restriction in your own project if you think it should work and are willing to take on the work of fixing things when they don't.
a)
I'm not sure where you are seeing a generator requirement of Node 16
b)
we can check that things don't break
I agree that it makes sense to restrict the versions until it is verified that they work.
Furthermore, a template that does not work yet should not be shown in the yo generator options.
This issue ticket was thought as a reminder to verify that everything works with node 16 and
if it also works with node 17, already allow to use it. Otherwise it is annoying to be forced to
downgrade the node version and re-install the packages, only to get some example code. In the
installation instructions in the readme it says "Node.js (version 8.0.0 or later)". I did not see a
spec that LTS version is required before running into the error.
=> Maybe it would be good for you to have some sort of check list with all places where code and doc needs to be adapted if the supported node version changes.
=> Maybe you could include some doc on how to clone the examples when wanting to use current node version instead of LTS (=quick alternative without yo generator, "at own risk").
c)
we are in the process of updating the templates
Great! I guess that will resolve the issue with the custom function example. I changed the package.json but the add-in was not loaded correctly. There was a message saying that I would need to use VisualStudio. The task pane example did not have that issue. Therefore, I guess that there are more issues then the version number in package.json for the custom function template.
=> Maybe you could include some doc on how to clone the examples when wanting to use current node version instead of LTS (=quick alternative without yo generator, "at own risk").
Dealing with the same problem. Sure the generator would be nice, but the pain of dealing with multiple node versions... I would also strongly prefer a guide to a manual setup.
OK . . . aside from the templates I did find where the generator-office plugin code does check for a LTS (even number) version of node.
The template code is stored in github repositories named Office-Addin-TaskPane and Excel-Custom-Functions . . . you can clone those and run the convertToSingleHost.js script to get roughly the same thing that yeoman outputs. I don't know that we would maintain instructions on how to do this because it would suggest a "supported" way of generating the projects and invite further questions around making everything work right. We don't have a list of things that could break, because it really depends on how node and the modules we use change over time.
I would like to use the generator with nodejs 17.3.0.
However, the generator seems to require to use lts version 16.13.1.
Furthermore, the custom functions example even requires node version <15 in package.json: