Create worksheet from website sample doesn't run in VS
Note: This template is only for reporting bugs about samples in this repo. If you have a product bug to report about Office web Add-ins, please submit the issue at https://github.com/OfficeDev/office-js/issues. This will help us respond to your issue faster.
(DELETE THIS PARAGRAPH AFTER READING)
URL of sample
https://github.com/OfficeDev/Office-Add-in-samples/tree/main/Samples/excel-create-worksheet-from-web-site
Describe the bug
When running the Visual Studio project, you get a note saying project is a class library and can't be run.
To Reproduce
Steps to reproduce the behavior:
- Open the VS Solution.
- Press F5.
Expected behavior
The Azure Function launches.
Screenshots
Environment
- Platform [PC desktop, Mac, iOS, Office Online]: Windows
- Host [Excel, Word, PowerPoint, etc.]: Excel
- Office version number: N/A
- Operating System: Windows 11
- Browser (if using Office Online): N/A
Additional context
Spent some time trying to fix this and also had errors in the WebApplication:
$ npm start
> [email protected] start
> node server.js
C:\GitHub\Office-Add-in-samples\Samples\excel-create-worksheet-from-web-site\WebApplication\node_modules\path-to-regexp\dist\index.js:73
throw new TypeError(`Missing parameter name at ${i}: ${DEBUG_URL}`);
^
TypeError: Missing parameter name at 1: https://git.new/pathToRegexpError
at name (C:\GitHub\Office-Add-in-samples\Samples\excel-create-worksheet-from-web-site\WebApplication\node_modules\path-to-regexp\dist\index.js:73:19)
at lexer (C:\GitHub\Office-Add-in-samples\Samples\excel-create-worksheet-from-web-site\WebApplication\node_modules\path-to-regexp\dist\index.js:91:27)
at lexer.next (<anonymous>)
at Iter.peek (C:\GitHub\Office-Add-in-samples\Samples\excel-create-worksheet-from-web-site\WebApplication\node_modules\path-to-regexp\dist\index.js:106:38)
at Iter.tryConsume (C:\GitHub\Office-Add-in-samples\Samples\excel-create-worksheet-from-web-site\WebApplication\node_modules\path-to-regexp\dist\index.js:112:28)
at Iter.text (C:\GitHub\Office-Add-in-samples\Samples\excel-create-worksheet-from-web-site\WebApplication\node_modules\path-to-regexp\dist\index.js:128:30)
at consume (C:\GitHub\Office-Add-in-samples\Samples\excel-create-worksheet-from-web-site\WebApplication\node_modules\path-to-regexp\dist\index.js:152:29)
at parse (C:\GitHub\Office-Add-in-samples\Samples\excel-create-worksheet-from-web-site\WebApplication\node_modules\path-to-regexp\dist\index.js:183:20)
at C:\GitHub\Office-Add-in-samples\Samples\excel-create-worksheet-from-web-site\WebApplication\node_modules\path-to-regexp\dist\index.js:294:74
at Array.map (<anonymous>)