繁体   English   中英

Bot Framework Azure部署在npm安装时失败

[英]Bot Framework Azure deployment fails at npm install

我正在尝试将我的机器人部署到Azure云。 但是部署每次都会失败。 像打字稿这样的其他软件包似乎可以很好地安装。 我也尝试了较新的botbuilder版本,但没有帮助。 我也尝试使用不同的node / npm版本。

我尝试的另一件事是在azure上使用基于Linux的Web服务,并且部署正常。 但是问题是您现在被迫使用专用的Azure机器人服务。 我有点主意,也许我错过了一些东西……这是部署时的控制台输出

+-- botbuilder@3.14.0 
| +-- async@1.5.2 
| +-- base64url@2.0.0 
| +-- chrono-node@1.3.5 
| | `-- moment@2.20.1 
| +-- jsonwebtoken@7.4.3 
| | +-- joi@6.10.1 
| | | +-- hoek@2.16.3 
| | | +-- isemail@1.2.0 
| | | `-- topo@1.1.0 
| | +-- jws@3.1.4 
| | | `-- jwa@1.1.5 
| | |   +-- buffer-equal-constant-time@1.0.1 
| | |   `-- ecdsa-sig-formatter@1.0.9 
| | +-- lodash.once@4.1.1 
| | +-- ms@2.1.1 
| | `-- xtend@4.0.1 
| +-- promise@7.3.1 
| | `-- asap@2.0.6 
| +-- request@2.83.0 
| | +-- aws-sign2@0.7.0 
| | +-- aws4@1.6.0 
| | +-- caseless@0.12.0 
| | +-- combined-stream@1.0.6 
| | | `-- delayed-stream@1.0.0 
| | +-- extend@3.0.1 
| | +-- forever-agent@0.6.1 
| | +-- form-data@2.3.2 
| | | `-- asynckit@0.4.0 
| | +-- har-validator@5.0.3 
| | | +-- ajv@5.5.2 
| | | | +-- co@4.6.0 
| | | | +-- fast-deep-equal@1.0.0 
| | | | +-- fast-json-stable-stringify@2.0.0 
| | | | `-- json-schema-traverse@0.3.1 
npm ERR! Windows_NT 10.0.14393
| | | `-- har-schema@2.0.0 
npm ERR! argv "D:\\Program Files (x86)\\nodejs\\6.12.3\\node.exe" "D:\\Program Files (x86)\\npm\\3.10.10\\node_modules\\npm\\bin\\npm-cli.js" "install" "--production"
| | +-- hawk@6.0.2 
| | | +-- boom@4.3.1 
npm ERR! node v6.12.3
| | | | `-- hoek@4.2.1 
npm ERR! npm  v3.10.10
| | | +-- cryptiles@3.1.2 
npm ERR! path D:\home\site\wwwroot\node_modules\.staging\minimist-1a79deb0\test
| | | | `-- boom@5.2.0 
npm ERR! code EPERM
| | | |   `-- hoek@4.2.1 
npm ERR! errno -4048
| | | +-- hoek@4.2.1 
npm ERR! syscall scandir
| | | `-- sntp@2.1.0 

| | |   `-- hoek@4.2.1 
npm ERR! Error: EPERM: operation not permitted, scandir 'D:\home\site\wwwroot\node_modules\.staging\minimist-1a79deb0\test'
| | +-- is-typedarray@1.0.0 
npm ERR!     at Error (native)
| | +-- isstream@0.1.2 
npm ERR!  { Error: EPERM: operation not permitted, scandir 'D:\home\site\wwwroot\node_modules\.staging\minimist-1a79deb0\test'
| | +-- json-stringify-safe@5.0.1 
npm ERR!     at Error (native)
| | +-- mime-types@2.1.17 
npm ERR!   errno: -4048,
| | | `-- mime-db@1.30.0 
npm ERR!   code: 'EPERM',
| | +-- oauth-sign@0.8.2 
npm ERR!   syscall: 'scandir',
| | +-- performance-now@2.1.0 
npm ERR!   path: 'D:\\home\\site\\wwwroot\\node_modules\\.staging\\minimist-1a79deb0\\test' }
| | +-- safe-buffer@5.1.1 
npm ERR! 
| | +-- stringstream@0.0.5 
npm ERR! Please try running this command again as root/Administrator.
| | `-- tunnel-agent@0.6.0 

| +-- rsa-pem-from-mod-exp@0.8.4 
npm ERR! Please include the following file with any support request:
| +-- sprintf-js@1.1.1 
npm ERR!     D:\home\site\wwwroot\npm-debug.log
| `-- url-join@1.1.0 

这是我的package.json

{
  "name": "bot",
  "version": "1.0.0",
  "description": "Bot",
  "main": "server.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "postinstall": "tsc -p ."
  },

  ...

  },
  "homepage": "https://gitlab.com/goflink/flinkbot#README",
  "engines": {
    "node": "= 6.12.3",
    "npm": "= 3.10.10"
  },
  "dependencies": {
    "@types/dotenv": "^4.0.2",
    "@types/restify": "^5.0.7",
    "@types/tedious": "^1.8.32",
    "botbuilder": "^3.14.0",
    "botbuilder-azure": "^3.0.4",
    "dotenv": "^5.0.0",
    "request-promise": "^4.2.2",
    "restify": "^6.3.4",
    "typescript": "^2.7.1"
  }
}

我发现一个似乎有效的配置。 强制清除缓存作为预安装和强制节点v4的组合。 这不是一个非常令人满意的解决方案,但是我希望这对将来的人有所帮助。

{
  "name": "bot",
  "version": "1.0.0",
  "description": "Bot ",
  "main": "server.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "preinstall": "npm cache clear --force",
    "postinstall": "tsc -p ."
  },
  "dependencies": {
    "@types/dotenv": "^4.0.2",
    "@types/restify": "^5.0.7",
    "@types/tedious": "^1.8.32",
    "botbuilder": "^3.14.0",
    "botbuilder-azure": "^3.0.4",
    "dotenv": "^5.0.0",
    "request-promise": "^4.2.2",
    "restify": "^6.3.4",
    "typescript": "^2.7.1"
  },
  "engines": {
    "node": "4.0.0"
  },
  "repository": {
    ...
  },
  "keywords": [
    ...
  ],
  "author": "...",
  "license": "ISC",
  "bugs": {
    "url": "..."
  },
  "homepage": "..."
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM