generator-office icon indicating copy to clipboard operation
generator-office copied to clipboard

Errors when creating new addin

Open jozefizso opened this issue 2 years ago • 7 comments

Prerequisites

  • [x] I am running the latest version of Node and the tools
  • [x] I checked the documentation and found no answer
  • [x] I checked to make sure that this issue has not already been filed

Expected behavior

Creating new addin should work seamlessly.

Current behavior

This error happens when new project is created:


I'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.


npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @babel/helper-module-transforms@^7.23.3.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in: /Users/izso/.npm/_logs/2023-11-26T14_47_05_244Z-debug-0.log

No change to package.json was detected. No package manager install will be executed.

Steps to Reproduce

Follow instructions at https://learn.microsoft.com/en-us/office/dev/add-ins/tutorials/powerpoint-tutorial?tabs=yeomangenerator

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: macOS 14
  • Node version: 20
  • Office version: -
  • Tool version: -

jozefizso avatar Nov 26 '23 14:11 jozefizso

When installing packages using npm install it shows another set of errors:

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@azure/[email protected]',
npm WARN EBADENGINE   required: { node: '10 || 12 || 14 || 16 || 18' },
npm WARN EBADENGINE   current: { node: 'v20.10.0', npm: '10.2.3' }
npm WARN EBADENGINE }
npm WARN deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated [email protected]: This functionality has been moved to @npmcli/fs
npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm WARN deprecated @azure/[email protected]: A newer major version of this library is available. Please upgrade to the latest available version.
npm WARN deprecated @azure/[email protected]: A newer major version of this library is available. Please upgrade to the latest available version.

added 1360 packages, and audited 1361 packages in 2m

186 packages are looking for funding
  run `npm fund` for details

10 moderate severity vulnerabilities

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

jozefizso avatar Nov 26 '23 14:11 jozefizso

@jozefizso, I am not a maintainer, but I believe the error you are encountering is due to the use of Node v20, which likely requires a lower version. If you have NVM installed, you can switch to version 18 by running the command nvm use --lts=hydrogen, which should resolve the issue.

However, if you have opened this issue to prompt compatibility with v20, I hope the maintainers will do something about it.

nivethan-dev avatar Nov 27 '23 03:11 nivethan-dev

Yes . . . this is a known issue with some package we depend on and node v20. We are working on getting a fix form our partners. Using a lower version of node is the work around for the time being.

millerds avatar Nov 27 '23 20:11 millerds

Node 20 is current LTS available for 7 months already.

jozefizso avatar Nov 27 '23 20:11 jozefizso

It has been available for 7 months, but was only recently made LTS. It is something we are going to support, it just taking time to get our down-level package dependencies to get current.

millerds avatar Nov 27 '23 20:11 millerds

Developing on Windows, this was painful. Per the author, I was using a Microsoft article for creating an Excel addin. In particular, using this command: npm install -g yo generator-office. I started with the LTS installer for windows which installed v20.10. Once, I received a similar error as the author, I came here and found this post. Per @millerds post above, I switched to node v19.8.0. Again, no go. Then went to 18.19.0. Again, no go. Then went to 17.9.1. Definitely, a no go. Switched back to v19.8.0 and read the unsupported engine required text for yeoman where it said either 18.17.0 or >= 20.5.0. Then went to 18.17.0 and success.

Long story short, use node v18.17.0

mblack-montag avatar Dec 04 '23 19:12 mblack-montag

I asked here

https://github.com/OfficeDev/office-js-docs-pr/issues/4304

to update the documentation at

https://learn.microsoft.com/en-us/office/dev/add-ins/quickstarts/excel-quickstart-jquery?tabs=yeomangenerator#create-the-add-in-project

to not list "Node.js (the latest LTS version" as a prerequesite. Furthermore, Linux does not seem to be supported and I did not see some hint about that in the readme.

fhg-isi avatar Dec 07 '23 09:12 fhg-isi

Updated packages that have support for Node 20 should be released now.

millerds avatar Mar 29 '24 21:03 millerds