yo office would complete the npm installation, as it does when you select the Javascript runtime instead of the shared runtime
The package.json and webpack.config.js would be at least as up to date as when you select the javascript runtime.
Current behavior
The manifest.xml and webconfig.config.js are not updated, as one would expect if desiring to start off with a new shared runtime prokect. The webpack.config.js, appears to be more up to date with the javascript runtime when compared to the shared runtime option (though I'm no webpack expert). Take the polyfill as an example, in a javascript runtime it's ["core-js/stable", "regenerator-runtime/runtime"], in the shared runtime webpack config it's "@babel/polyfill", which is what it was some time ago. Another (small) example. In the javascript runtime generator, it places a stylesheet with version 11.0.0, in the shared runtime generator, the version is 9.6.1. Further, the package.json in the javascript runtime has an engines node, and items in the dependencies node, whereas the shared runtime package.json does not. All of the devDependencies in the shared runtime package.json are out of date as well.
Apart from all of the above, the npm install at the end of the generator does not work with the shared runtime. I get this:
npm ERR! code E401
npm ERR! Unable to authenticate, your authentication token seems to be invalid.
npm ERR! To correct this please trying logging in again with:
npm ERR! npm login
Note: I do not get this error when running for the javascript runtime.
Install requirements as stated above, as stated in docs.
Run yo office
Select Excel Custom Functions using a Shared Runtime
Observe error from npm.
Observe files in created directory
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Operating System: Windows 10
Node version: Above
Office version: Probably irrelevant, but Microsoft 365 Apps for Enterprise Version 2206 (Build 15330.20306)
Tool version: Above
Failure Logs
Above.
Comments
Assuming this is reproducible given the latest versions I have used (which is what is recommended in docs), if this is the status of the Shared Runtime option, it should be removed from the generator until it's fixed. It's very unclear why this option exists given it hasn't applied the steps in how to configure for a shared runtime. I'd ask, even if the npm install and webpack bundling worked, what value is it providing?
Prerequisites
Node LTS (as specified in docs): 16.17.1 npm@8.15.0 yo@4.3.0 generator-office@1.9.2
Please answer the following questions before submitting an issue.
Expected behavior
I expected that:
yo office
and selecting Excel Custom Functions using a Shared Runtime would already have the manifest.xml, webpack.config.js, and the rest of the project structure situated as if you already went through the procedures documented here: https://learn.microsoft.com/en-us/office/dev/add-ins/develop/configure-your-add-in-to-use-a-shared-runtimeyo office
would complete the npm installation, as it does when you select the Javascript runtime instead of the shared runtimeCurrent behavior
The manifest.xml and webconfig.config.js are not updated, as one would expect if desiring to start off with a new shared runtime prokect. The webpack.config.js, appears to be more up to date with the javascript runtime when compared to the shared runtime option (though I'm no webpack expert). Take the polyfill as an example, in a javascript runtime it's
["core-js/stable", "regenerator-runtime/runtime"]
, in the shared runtime webpack config it's"@babel/polyfill"
, which is what it was some time ago. Another (small) example. In the javascript runtime generator, it places a stylesheet with version 11.0.0, in the shared runtime generator, the version is 9.6.1. Further, the package.json in the javascript runtime has an engines node, and items in the dependencies node, whereas the shared runtime package.json does not. All of the devDependencies in the shared runtime package.json are out of date as well.Apart from all of the above, the npm install at the end of the generator does not work with the shared runtime. I get this:
Note: I do not get this error when running for the javascript runtime.
The error appears to stem from this:
Steps to Reproduce
yo office
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Failure Logs
Above.
Comments
Assuming this is reproducible given the latest versions I have used (which is what is recommended in docs), if this is the status of the Shared Runtime option, it should be removed from the generator until it's fixed. It's very unclear why this option exists given it hasn't applied the steps in how to configure for a shared runtime. I'd ask, even if the npm install and webpack bundling worked, what value is it providing?