简体   繁体   中英

Error with node.js deployment on Linux Azure web app

I habe an azur app service (Linux), connected to a bitbucket git repository running.

When I try to deploy it, I get this error:

> lhfrontend@1.0.0 postinstall /home/site/wwwroot
> npm run webdriver:update

npm WARN invalid config loglevel="notice"

> lhfrontend@1.0.0 webdriver:update /home/site/wwwroot
> node ./node_modules/protractor/bin/webdriver-manager update

module.js:471
    throw err;
    ^

Error: Cannot find module '/home/site/wwwroot/node_modules/protractor/bin/webdriver-manager'
An error has occurred during web site deployment.
    at Function.Module._resolveFilename (module.js:469:15)
npm failed
    at Function.Module._load (module.js:417:25)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:389:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:504:3

npm ERR! Linux 4.4.0-108-generic
npm ERR! argv "/opt/nodejs/6.11.0/bin/node" "/usr/bin/node_modules/npm/bin/npm-cli.js" "run" "webdriver:update"
npm ERR! node v6.11.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! lhfrontend@1.0.0 webdriver:update: `node ./node_modules/protractor/bin/webdriver-manager update`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the lhfrontend@1.0.0 webdriver:update script 'node ./node_modules/protractor/bin/webdriver-manager update'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the lhfrontend package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./node_modules/protractor/bin/webdriver-manager update
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs lhfrontend
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls lhfrontend
npm ERR! There is likely additional logging output above.

Does any one have an idea, how to fix this?

Thanks in advance, Dennis

Check if you have installed protractor module. If not, run this command in your app's root:

npm install protractor

Or add this to the dependencies section of your package.json:

"dependencies": {
  "protractor": "^5.2.2"
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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