已安装Sharepoint NPM,但Visual Studio无法识别它

时间:2020-07-21 09:02:30

标签: typescript visual-studio npm sharepoint

我正在使用Visual Studio 2019在TypeScript中做一个项目。自从上一个git分支合并以来,Visual Studio用红色下划线标出了来自Sharepoint npm的所有函数。 但是,npm软件包已正确安装(我猜)并且是最新的。 这是我的package.json的副本:

<Quiz>:
    FloatLayout:
        id: thelayout
        size: root.width, root.height
        canvas.before:
            Color:
                rgba: 1, 1, 1, 1
            Rectangle:
                pos: self.pos
                size: self.size
        Button:
            text: 'press me'
            pos_hint: {'x': 0.0, 'y': 0.2}
            size_hint: 0.3, 0.3
            on_release: self.disabled = True

还有我的tsconfig.json的副本

{
  "name": "solution-ticketing",
  "version": "0.0.0",
  "description": "SolutionTicketing",
  "main": "app.js",
  "author": "",
  "dependencies": {
    "@types/jquery": "^3.5.0",
    "@types/node": "^14.0.24",
    "@types/request": "^2.48.5",
    "@types/sharepoint": "^2016.1.8",
    "browserify": "^16.5.1",
    "glob": "^7.1.6",
    "gulp": "^4.0.2",
    "gulp-cached": "^1.1.1",
    "gulp-spsave": "^3.1.1",
    "gulp-typescript": "^6.0.0-alpha.1",
    "merge-stream": "^2.0.0",
    "path": "^0.12.7",
    "reactify": "^1.1.1",
    "source": "0.0.3",
    "typescript": "^3.9.7",
    "vinyl-source-stream": "^2.0.0"
  },
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "license": "ISC"
}

当我用Gulp编译时,没有错误。

0 个答案:

没有答案