javascript - Error: Cannot find module 'asn1' when trying to run a node.js app -
i trying run node.js app on azure app service node 8.1.4.
the app runs fine on local machine.
i copied entire app, including node_modules, azure app service, this:
mon sep 11 2017 07:52:14 gmt+0000 (coordinated universal time): application has thrown uncaught exception , terminated: error: cannot find module 'asn1' @ function.module._resolvefilename (module.js:338:15) @ function.module._load (module.js:289:25) @ module.require (module.js:366:17) @ require (module.js:385:17) @ object.<anonymous> (d:\home\site\wwwroot\node_modules\sshpk\lib\formats\pem.js:9:12) @ module._compile (module.js:435:26) @ object.module._extensions..js (module.js:442:10) @ module.load (module.js:356:32) @ function.module._load (module.js:313:12) @ module.require (module.js:366:17) @ require (module.js:385:17) this coming package called sshpk. here dependencies:
"dependencies": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", "bcrypt-pbkdf": "^1.0.0", "dashdash": "^1.12.0", "ecc-jsbn": "~0.1.1", "getpass": "^0.1.1", "jsbn": "~0.1.0", "tweetnacl": "~0.14.0" }, i checked , asn1 package there in top-level node_modules folder. copied asn1 package node_modules inside sshpk, didn't help.
what can reason why package still not found? how can troubleshoot this?
update: tried running npm cache clear , npm install -g npm on azure server, nothing changed.
the entire top-level package.json:
{ "name": "my_project", "version": "0.0.0", "private": true, "scripts": { "start": "node --inspect server.js" }, "dependencies": { "@google-cloud/datastore": "^1.1.0", "asn1": "^0.2.3", "async": "^2.1.2", "body-parser": "~1.15.2", "cookie-parser": "~1.4.3", "debug": "~2.2.0", "documentdb": "^1.10.0", "dotenv": "^4.0.0", "express": "~4.14.0", "morgan": "~1.7.0", "mssql": "^4.0.4", "serve-favicon": "~2.3.0" } }
Comments
Post a Comment