Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm start:desktop script does not exist #847

Open
arbass22 opened this issue Nov 4, 2024 · 2 comments
Open

npm start:desktop script does not exist #847

arbass22 opened this issue Nov 4, 2024 · 2 comments
Assignees

Comments

@arbass22
Copy link

arbass22 commented Nov 4, 2024

Expected behavior

I can follow the quickstart guide here to get an outlook add in with react working.

Current behavior

After following the directions the package.json does not contain a script for npm start:desktop

Steps to Reproduce

``bash
$ npm install -g yo generator-office
$ yo office

outlook yo office

? Choose a project type: Office Add-in Task Pane project using React framework
? Choose a script type: TypeScript
? What do you want to name your add-in? poka-outlook
? Which Office client application would you like to support? Outlook
? Which manifest type would you like to use? unified manifest for Microsoft 365

``
See above to install. npm start failed so I tried the instructions here: https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/sideload-outlook-add-ins-for-testing#sideload-manually

Which say to run npm start:desktop which is not a command that exists in my package.json that was generated:

{
  "name": "office-addin-taskpane-react",
  "version": "0.0.1",
  "repository": {
    "type": "git",
    "url": "https://github.com/OfficeDev/Office-Addin-TaskPane-React.git"
  },
  "license": "MIT",
  "config": {
    "app_to_debug": "outlook",
    "app_type_to_debug": "desktop",
    "dev_server_port": 3000
  },
  "scripts": {
    "build": "webpack --mode production",
    "build:dev": "webpack --mode development",
    "dev-server": "webpack serve --mode development",
    "lint": "office-addin-lint check",
    "lint:fix": "office-addin-lint fix",
    "prettier": "office-addin-lint prettier",
    "signin": "office-addin-dev-settings m365-account login",
    "signout": "office-addin-dev-settings m365-account logout",
    "start": "office-addin-debugging start manifest.json",
    "stop": "office-addin-debugging stop manifest.json",
    "validate": "office-addin-manifest validate manifest.json",
    "watch": "webpack --mode development --watch"
  },
  "dependencies": {
    "@fluentui/react-components": "^9.46.8",
    "@fluentui/react-icons": "^2.0.232",
    "core-js": "^3.36.0",
    "es6-promise": "^4.2.8",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "regenerator-runtime": "^0.14.1"
  },
  "devDependencies": {
    "@babel/core": "^7.24.0",
    "@babel/preset-env": "^7.25.4",
    "@babel/preset-typescript": "^7.23.3",
    "@types/office-js": "^1.0.377",
    "@types/office-runtime": "^1.0.35",
    "@types/react": "^18.2.64",
    "@types/react-dom": "^18.2.21",
    "@types/webpack": "^5.28.5",
    "acorn": "^8.11.3",
    "babel-loader": "^9.1.3",
    "copy-webpack-plugin": "^12.0.2",
    "eslint-plugin-office-addins": "^3.0.2",
    "eslint-plugin-react": "^7.28.0",
    "file-loader": "^6.2.0",
    "html-loader": "^5.0.0",
    "html-webpack-plugin": "^5.6.0",
    "less": "^4.2.0",
    "less-loader": "^12.2.0",
    "office-addin-cli": "^1.6.5",
    "office-addin-debugging": "^5.1.6",
    "office-addin-dev-certs": "^1.13.5",
    "office-addin-lint": "^2.3.5",
    "office-addin-manifest": "^1.13.6",
    "office-addin-prettier-config": "^1.2.1",
    "os-browserify": "^0.3.0",
    "process": "^0.11.10",
    "source-map-loader": "^5.0.0",
    "ts-loader": "^9.5.1",
    "typescript": "^5.4.2",
    "webpack": "^5.95.0",
    "webpack-cli": "^5.1.4",
    "webpack-dev-server": "5.1.0"
  },
  "prettier": "office-addin-prettier-config",
  "browserslist": [
    "last 2 versions",
    "ie 11"
  ]
}

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: Mac 14.4.1 (23E224)
  • Node version: v18.18.2
  • Office version: Version 16.90.3 (24110120)
  • Tool version: 5.0.0

Failure Logs

If I run npm start I get these logs

➜  poka-outlook npm start

> [email protected] start
> office-addin-debugging start manifest.json

Debugging is being started...
App type: desktop
The dev server is already running on port 3000.
Sideloading the Office Add-in...
Manifest package saved to /var/folders/t3/sdfgh88d3hg6s7nbbn7rcdgw0000gn/T/manifest.zip
running: npx @microsoft/teamsapp-cli install --file-path "/var/folders/t3/sdfgh88d3hg6s7nbbn7rcdgw0000gn/T/manifest.zip"

Using account [email protected]

--Error sideloading!--
Error: Error: Command failed: npx @microsoft/teamsapp-cli install --file-path "/var/folders/t3/sdfgh88d3hg6s7nbbn7rcdgw0000gn/T/manifest.zip"
(✖) Error: m365.InternalError: Request failed with status code 404 (tracingId: 00-ec217fd98baa186d10d5f3aba6c682bb-46a0d0efa6fd1ae3-00) :

STDERR:
(✖) Error: m365.InternalError: Request failed with status code 404 (tracingId: 00-ec217fd98baa186d10d5f3aba6c682bb-46a0d0efa6fd1ae3-00) :

Error: Unable to start debugging.
Error: Unable to sideload the Office Add-in.
Error: Unable to register the Office Add-in.
Error: Command failed: npx @microsoft/teamsapp-cli install --file-path "/var/folders/t3/sdfgh88d3hg6s7nbbn7rcdgw0000gn/T/manifest.zip"
(✖) Error: m365.InternalError: Request failed with status code 404 (tracingId: 00-ec217fd98baa186d10d5f3aba6c682bb-46a0d0efa6fd1ae3-00) :

Please include any relevant log snippets, screenshots or code samples here.

@arbass22
Copy link
Author

arbass22 commented Nov 4, 2024

Don't this its the root issue here but it looks like according to this page, the unified manifest is not supported for Mac Outlook: https://learn.microsoft.com/en-us/office/dev/add-ins/develop/yeoman-generator-overview
If that's the case, that really should be mentioned in this guide: https://learn.microsoft.com/en-us/office/dev/add-ins/quickstarts/outlook-quickstart-yo

@millerds
Copy link
Contributor

millerds commented Nov 5, 2024

It looks like you are talking about two different issues. One is with "start:desktop" where the documentation doesn't match the generated project. And the other is with the sideloading error "Error: m365.InternalError: Request failed with status code 404".

For the first case . . . please log an issue in the "office-addin-taskpane-react" repo.

For the second . . . it looks like OfficeDev/teams-toolkit#12651 is the same thing and that team would be more equipped to help with this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants