OfficeDev / generator-office

Yeoman generator for building Microsoft Office related projects.
https://www.npmjs.com/package/generator-office
MIT License
825 stars 208 forks source link

`npm run start:web` no longer supported? #678

Closed AlexJerabek closed 2 years ago

AlexJerabek commented 2 years ago

Expected behavior

I expect the command npm run start:web to launch my add-in in an instance of Excel for the web, in the same manner npm run start:desktop works for the desktop client.

Current behavior

No client is launched. The following output is generated:

aljerabe@Tiresias MINGW64 /c/GitHub/test $ npm run start:web

office-addin-taskpane@0.0.1 start:web C:\GitHub\test office-addin-debugging start manifest.xml web

Debugging is being started... App type: web Starting the dev server... (webpack serve --mode development) The dev server is running on port 3000. Process id: 26744 Sideloading the Office Add-in... Error: Unable to start debugging. Error: Unable to sideload the Office Add-in. Error: For sideload to web, you need to specify a document url.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Run yo office.
  2. Create either an Office Add-in Task Pane project for Excel or an Excel Custom Functions project.
  3. Go to the new folder and run npm run build.
  4. Run npm run start:web.

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

$ npm run start:web

office-addin-taskpane@0.0.1 start:web C:\GitHub\test office-addin-debugging start manifest.xml web

Debugging is being started... App type: web Starting the dev server... (webpack serve --mode development) The dev server is running on port 3000. Process id: 26744 Sideloading the Office Add-in... Error: Unable to start debugging. Error: Unable to sideload the Office Add-in. Error: For sideload to web, you need to specify a document url.

millerds commented 2 years ago

The error message says "Error: For sideload to web, you need to specify a document url". We don't currently support creating documents on the fly to add to an unknown server hosting office online (like a SharePoint server or OneDrive). We require you to specify the url of a document you already have by adding "-- --document " to the command where is the url of the document to launch the add-in in.

akrantz commented 2 years ago

Darren, what you stated was correct. For sideload to web, it needs to specify a document. Using the command line, this means adding --document with the url of the Office document.