在Azure上安装gulp-typescript时,npm失败

时间:2016-09-22 17:34:38

标签: azure gulp-typescript

我正在尝试部署我的Azure AppService。应用程序是使用TypeScript(服务器和客户端)编写的。部署一切正常,直到它安装gulp-typescript。这用于将TypeScript代码转换为postinstall脚本的一部分。

的package.json:


    {
      "name": "test-webapp",
      "version": "1.0.0",
      "description": "Test Application",
      "engines": {
        "node": "4.4.6"
      },
      "main": "server.js",
        "scripts": {
          "start": "node server/server.js",
          "typings": "typings",
          "postinstall": "node node_modules/bower/bin/bower install && npm run typings install && node node_modules/gulp/bin/gulp.js ts-compile"
      },
      "author": {
        "name": "liskaj",
        "email": ""
      },
      "dependencies": {
        "body-parser": "^1.15.2",
        "bower": "^1.7.9",
        "cors": "^2.7.1",
        "express": "^4.14.0",
        "express-session": "^1.14.0",
        "gulp": "^3.9.1",
        "gulp-sourcemaps": "^1.6.0",
        "gulp-typescript": "^2.13.6",
        "request": "^2.73.0",
        "typescript": "^1.8.10",
        "typings": "^1.3.2",
        "winston": "^2.2.0"
      }
    }

Azure日志输出:

remote: npm ERR! node v4.4.6
remote: npm ERR! npm  v2.15.5
remote: npm ERR! path D:\home\site\wwwroot\node_modules\gulp-typescript\node_modules\vinyl-fs\node_modules\globstream\node_modules\micromatch\node_modules\braces\node_modules\expand-range\node_modules\fill-range\node_modules\isobject\node_modules\isarray\package.json.3240780430
remote: npm ERR! code EINVAL
remote: npm ERR! errno -4071
remote: npm ERR! syscall rename
remote:
remote: npm ERR! EINVAL: invalid argument, rename 'D:\home\site\wwwroot\node_modules\gulp-typescript\node_modules\vinyl-fs\node_modules\glob-stream\node_modules\micromatch\node_modules\braces\node_modules\expand-range\node_modules\fill-range\node_modules\isobject\node_modules\isarray\package.json.3240780430' -> 'D:\home\site\wwwroot\node_modules\gulp-typescript\node_modules\vinyl-fs\node_modules\glob-stream\node_modules\micromatch\node_modules\braces\node_modules\expand-range\node_modules\fill-range\node_modules\isobject\node_modules\isarray\package.json

这在本地(Windows 7 + Windows 10)以及Heroku上都可以正常工作。

0 个答案:

没有答案