在`node_modules`下找不到`@microsoft/office-js`

问题描述 投票:0回答:1

我有一个 ReactJS 项目。我想在项目中使用https://www.npmjs.com/package/@microsoft/office-js以避免使用CDN时出现

Office.js has not fully loaded
错误。所以我就这么做了
yarn add @microsoft/office-js
。以下是新的
package.json
。然而,
yarn
之后,我找不到
@microsoft
下的文件夹
node_modules

有谁知道

@microsoft/office-js
保存在哪里吗?

{
  "name": "frontend",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@codingame/monaco-languageclient": "^0.17.3",
    "@fluentui/react": "^8.33.0",
    "@fluentui/react-components": "^9.7.2",
    "@handsontable/react": "^9.0.2",
    "@material-ui/core": "^4.9.8",
    "@microsoft/office-js": "^1.1.88",
    "@microsoft/office-js-helpers": "^1.0.2",
    "@monaco-editor/react": "4.4.6",
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.3.2",
    "@testing-library/user-event": "^7.1.2",
    "@types/react-stripe-elements": "^6.0.4",
    "@uifabric/react-cards": "^0.109.49",
    "allotment": "^1.17.1",
    "axios": "^0.19.2",
    "color": "^3.1.2",
    "copy-to-clipboard": "^3.3.1",
    "cross-storage": "^1.0.0",
    "dva": "^2.4.1",
    "dva-model-creator": "^0.4.3",
    "formik": "^2.1.4",
    "handsontable": "^9.0.2",
    "highcharts": "^7.0.3",
    "highcharts-react-official": "^3.0.0",
    "i18next": "^22.4.10",
    "is-primitive": "^3.0.1",
    "lodash": "^4.17.15",
    "markdown-to-jsx": "^7.1.9",
    "moment": "^2.24.0",
    "monaco-editor": "^0.31.1",
    "node-sass": "^4.14.1",
    "office-ui-fabric-core": "^11.0.0",
    "office-ui-fabric-react": "6.214.1",
    "query-string": "^6.11.1",
    "react": "^16.13.1",
    "react-app-polyfill": "^1.0.6",
    "react-bootstrap": "^1.0.1",
    "react-dom": "^16.13.1",
    "react-i18next": "^12.2.0",
    "react-intl": "^6.2.10",
    "react-markdown": "^8.0.5",
    "react-meta-tags": "^1.0.1",
    "react-monaco-editor": "^0.35.0",
    "react-scripts": "3.4.1",
    "react-stripe-elements": "^6.1.1",
    "react-syntax-highlighter": "^15.5.0",
    "redux-devtools-extension": "^2.13.8",
    "rehype-raw": "^6.1.1",
    "remark-gfm": "^3.0.1",
    "remark-parse": "^10.0.1",
    "styled-components": "^5.3.5",
    "unified": "^10.1.2",
    "yup": "^0.28.3"
  },
  "scripts": {
    "start": "PORT=3000 react-app-rewired start",
    "start:https": "HTTPS=true react-app-rewired start",
    "build": "GENERATE_SOURCEMAP=false react-scripts --max_old_space_size=8096 build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": [
    ">0.2%",
    "not dead",
    "not op_mini all"
  ],
  "devDependencies": {
    "@types/color": "^3.0.1",
    "@types/cross-storage": "^0.8.29",
    "@types/jest": "^25.1.4",
    "@types/lodash": "^4.14.149",
    "@types/node": "^13.9.5",
    "@types/office-js": "^1.0.92",
    "@types/query-string": "^6.3.0",
    "@types/react": "^16.9.27",
    "@types/react-dom": "^16.9.5",
    "@types/react-redux": "^7.1.7",
    "@types/styled-components": "^5.0.1",
    "@types/yup": "^0.26.33",
    "css-loader": "^3.5.3",
    "react-app-rewired": "^2.1.8",
    "style-loader": "^1.2.1",
    "typescript": "^4.9.5"
  },
  "resolutions": {
    "monaco-editor": "0.31.1",
    "@types/react": "17.0.2"
  }
}

reactjs office-js
1个回答
0
投票

在 Mac 上它就在那里:

命令行确认:

ls -la node_modules/@micro*

NPM 文档还列出了:

本地安装 NPM 包会在运行 npm install 命令的目录的 node_modules@microsoft\office-js\dist 文件夹中创建一组静态 Office.js 文件。

© www.soinside.com 2019 - 2024. All rights reserved.