Hello,
I am following the 'Any Editor' version of the tutorial. I "yo office" with the appropriate settings, cd into dir and 'npm start' but the local webserver does not start with console message:
Starting the dev server... (webpack-dev-server --mode development)
Unable to start the dev server. Error: The dev server is not running on port 3000.
Powerpoint will open with an
'Add-in Error':
This add-in is no longer available. If this add-in's manifest was removed, please restore it to its previous location and try again.
Any suggestions?
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Hi @12s - Thanks for trying out Powerpoint add-ins submitting an issue about this! Our docs team will take a look and get back to you. As the Microsoft //build conference happens this week, we may take a few days to respond as our team is busier than normal.
@12s I tried this on a Windows 10 machine but it's working. Can you share more details about your setup (e.g. OS, Office version)?
@akrantz @TCourtneyOwen: Any suggestions that may help here?
Thanks.
I am running macOS Mojave 10.14.4
I installed the current version of generator-office
Microsoft PowerPoint for Mac
Version 16.16.9
So, in the mean time I have been developing on my windows machine where everything has been working as expected.
I do have a more pressing issue now. Basically this stack post:
The post is from 3 years ago so I'm hoping there is a solution, but I too can't get any additional slide information from getSelectedDataAsync other than Id, title and index.
Is this still the case?
@12s:
Thanks again for raising the issues.
I'll go ahead and close this now but let us know to reopen it if you're still facing an issue.
Hi!
I'm having the same issue on the same system as 12s. I tried to use Node Version Manager, which on its own went smooth but didn't help regarding this.
I would be grateful for any ideas of how to make this error go away.
Well, I seem to have found the solution right now. sudo npm start was a success.
@JanZelenka: It's good that you're unblocked but we don't recommend using sudo as a long-term solution since that would seem to indicate there are still some permission/config issues.
@12s: Did you get a chance to try NVM? If so, can you share your results?
Thanks.
I know what the problem is. We've updated the Yo Office templates to make it easier to generate and install certificates for https://localhost. When "npm run dev-server" or "npm build" is done, the webpack config has a plugin which will generate the certificates and then prompt for permission to install them. The "npm start" command wll start the dev server as a detached process if it has not already been started, but the command output is not shown. Therefore, when "npm start" is used and the dev server is not already running, if dev certs need to be installed, the prompt cannot be seen, and after 30 seconds, the start command will stop waiting for the dev server to be started and show the error "Unable to start the dev server. Error: The dev server is not running on port 3000."
The workaround is to do one of the following:
npx office-addin-dev-certs install. Enter the password when prompted.npm run dev-server before running npm start. Enter the password when prompted.Dev Server to run the dev server inside VS Code. Enter the password when prompted.There is a difference on Windows where the need to accept installing the dev certs is a dialog that appears rather than simply asking for the password to be entered from the command line. Therefore, this is not a problem on Windows.
I usually do #3 above, and in fact the task is set up to automatically start the Dev Server task when the folder is opened in VS Code, if you enable automatic tasks for the folder.
@akrantz: Thanks for your response. We'll see how we can incorporate this info with the various quick starts and tutorials.
@12s, @JanZelenka: Can you try this and let us know the outcome? Thanks.
@ElizabethSamuel-MSFT It would help to update the docs with information about this problem on Mac.
It is probably best to have them do npm run dev-server first, so there is a visible window showing the dev-server output, then Command+T to open a new tab (since the dev server keeps running), and then npm start.
Alternatively, if the instructions are focused on using VS Code, I would recommend doing everthing in VS Code. I find this a better approach because when I close VS Code, it automatically closes the associated dev server.
Glad to discuss more or review doc changes. Thanks.
Thanks for the quick response!
I have tried npm run dev-server and afterwards npm start in a new tab, got no errors and the web server is happily running.
Grateful your help!
@JanZelenka I'm glad to hear it!
Yes, running npm dev-server before npm start shows
"the dev server is already running on port 3000" correctly, followed by "Debugging started".
When powerpoint opens I see the same "Add-in Error" thinking the manifest is missing.
I'll keep trying to debug the issue, but without an API endpoint to get and set text (beyond the slide title from getSlideMetadata) my project won't go far :(
@12s Glad that the server is up and running now.
Regarding the "Add-in error", can you try sideloading the add-in? Let us know if that helps.
Thanks.
We've updated the tutorials and quick start with Mac guidance. Those updates should be go live this week.
Hey Elizabeth,
Looking forward to the Mac guide. I'll follow along when its up.
@12s We look forward to hearing your feedback on that. However, were you able to try sideloading the add-in? Thanks.
Waiting for the Mac guides as well here 🙏 ! In the mean time I followed @akrantz suggestion https://github.com/OfficeDev/office-js-docs-pr/issues/978#issuecomment-493118079
Closing this as the changes are live. We appreciate all the input on this. If you're still facing issues, let us know. Thanks.
I have the same issue and it is because I have a space in my username :(
Most helpful comment
I know what the problem is. We've updated the Yo Office templates to make it easier to generate and install certificates for https://localhost. When "npm run dev-server" or "npm build" is done, the webpack config has a plugin which will generate the certificates and then prompt for permission to install them. The "npm start" command wll start the dev server as a detached process if it has not already been started, but the command output is not shown. Therefore, when "npm start" is used and the dev server is not already running, if dev certs need to be installed, the prompt cannot be seen, and after 30 seconds, the start command will stop waiting for the dev server to be started and show the error "Unable to start the dev server. Error: The dev server is not running on port 3000."
The workaround is to do one of the following:
npx office-addin-dev-certs install. Enter the password when prompted.npm run dev-serverbefore runningnpm start. Enter the password when prompted.Dev Serverto run the dev server inside VS Code. Enter the password when prompted.There is a difference on Windows where the need to accept installing the dev certs is a dialog that appears rather than simply asking for the password to be entered from the command line. Therefore, this is not a problem on Windows.
I usually do #3 above, and in fact the task is set up to automatically start the Dev Server task when the folder is opened in VS Code, if you enable automatic tasks for the folder.