Error: ./~/sshpk/lib/dhe.js Module not found


#1

Why i have this error when build to ionic pro. Thanks

[12:02:33] webpack started …
[12:02:33] copy finished in 5.97 s
[12:02:48] ionic-app-script task: “build”
[12:02:48] Error: ./~/sshpk/lib/dhe.js Module not found: Error: Can’t resolve ‘ecc-jsbn’ in
‘/usr/src/app/node_modules/sshpk/lib’ resolve ‘ecc-jsbn’ in ‘/usr/src/app/node_modules/sshpk/lib’ Parsed
request is a module using description file: /usr/src/app/node_modules/sshpk/package.json (relative path:
./lib) Field ‘browser’ doesn’t contain a valid alias configuration after using description file:
/usr/src/app/node_modules/sshpk/package.json (relative path: ./lib) resolve as module looking for modules in
/usr/src/app/node_modules using description file: /usr/src/app/package.json (relative path: ./node_modules)
Field ‘browser’ doesn’t contain a valid alias configuration after using description file:
/usr/src/app/package.json (relative path: ./node_modules) using description file: /usr/src/app/package.json
(relative path: ./node_modules/ecc-jsbn) no extension Field ‘browser’ doesn’t contain a valid alias
configuration /usr/src/app/node_modules/ecc-jsbn doesn’t exist .ts Field ‘browser’ doesn’t contain a valid
alias configuration /usr/src/app/node_modules/ecc-jsbn.ts doesn’t exist .js Field ‘browser’ doesn’t contain
a valid alias configuration /usr/src/app/node_modules/ecc-jsbn.js doesn’t exist .json Field ‘browser’
doesn’t contain a valid alias configuration /usr/src/app/node_modules/ecc-jsbn.json doesn’t exist as
directory /usr/src/app/node_modules/ecc-jsbn doesn’t exist [/usr/src/app/node_modules/ecc-jsbn]
[/usr/src/app/node_modules/ecc-jsbn.ts] [/usr/src/app/node_modules/ecc-jsbn.js]
[/usr/src/app/node_modules/ecc-jsbn.json] [/usr/src/app/node_modules/ecc-jsbn] @ ./~/sshpk/lib/dhe.js
46:11-30 375:10-29 @ ./~/sshpk/lib/key.js @ ./~/sshpk/lib/index.js @ ./~/http-signature/lib/signer.js @
./~/http-signature/lib/index.js @ ./~/request/request.js @ ./~/request/index.js @
./~/request-promise-native/lib/rp.js @ ./~/nem-library/dist/src/infrastructure/AccountHttp.js @
./~/nem-library/dist/src/infrastrcture.js @ ./~/nem-library/dist/index.js @
./src/providers/nem/nem.provider.ts @ ./src/app/app.module.ts @ ./src/app/main.ts,./~/sshpk/lib/dhe.js
Module not found: Error: Can’t resolve ‘jsbn’ in ‘/usr/src/app/node_modules/sshpk/lib’ resolve ‘jsbn’ in
‘/usr/src/app/node_modules/sshpk/lib’ Parsed request is a module using description file:
/usr/src/app/node_modules/sshpk/package.json (relative path: ./lib) Field ‘browser’ doesn’t contain a valid
alias configuration after using description file: /usr/src/app/node_modules/sshpk/package.json (relative
path: ./lib) resolve as module looking for modules in /usr/src/app/node_modules using description file:
/usr/src/app/package.json (relative path: ./node_modules) Field ‘browser’ doesn’t contain a valid alias
configuration after using description file: /usr/src/app/package.json (relative path: ./node_modules) using
description file: /usr/src/app/package.json (relative path: ./node_modules/jsbn) no extension Field
‘browser’ doesn’t contain a valid alias configuration /usr/src/app/node_modules/jsbn doesn’t exist .ts Field
‘browser’ doesn’t contain a valid alias configuration /usr/src/app/node_modules/jsbn.ts doesn’t exist .js
Field ‘browser’ doesn’t contain a valid alias configuration /usr/src/app/node_modules/jsbn.js doesn’t exist
.json Field ‘browser’ doesn’t contain a valid alias configuration /usr/src/app/node_modules/jsbn.json
doesn’t exist as directory /usr/src/app/node_modules/jsbn doesn’t exist [/usr/src/app/node_modules/jsbn]
[/usr/src/app/node_modules/jsbn.ts] [/usr/src/app/node_modules/jsbn.js]
[/usr/src/app/node_modules/jsbn.json] [/usr/src/app/node_modules/jsbn] @ ./~/sshpk/lib/dhe.js 50:11-26
379:10-25 @ ./~/sshpk/lib/key.js @ ./~/sshpk/lib/index.js @ ./~/http-signature/lib/signer.js @
./~/http-signature/lib/index.js @ ./~/request/request.js @ ./~/request/index.js @
./~/request-promise-native/lib/rp.js @ ./~/nem-library/dist/src/infrastructure/AccountHttp.js @
./~/nem-library/dist/src/infrastrcture.js @ ./~/nem-library/dist/index.js @
./src/providers/nem/nem.provider.ts @ ./src/app/app.module.ts @ ./src/app/main.ts,./~/sshpk/lib/dhe.js
Module not found: Error: Can’t resolve ‘ecc-jsbn/lib/ec’ in ‘/usr/src/app/node_modules/sshpk/lib’ resolve
‘ecc-jsbn/lib/ec’ in ‘/usr/src/app/node_modules/sshpk/lib’ Parsed request is a module using description
file: /usr/src/app/node_modules/sshpk/package.json (relative path: ./lib) Field ‘browser’ doesn’t contain a
valid alias configuration after using description file: /usr/src/app/node_modules/sshpk/package.json
(relative path: ./lib) resolve as module looking for modules in /usr/src/app/node_modules using description
file: /usr/src/app/package.json (relative path: ./node_modules) Field ‘browser’ doesn’t contain a valid
alias configuration after using description file: /usr/src/app/package.json (relative path: ./node_modules)
using description file: /usr/src/app/package.json (relative path: ./node_modules/ecc-jsbn/lib/ec) no
extension Field ‘browser’ doesn’t contain a valid alias configuration
/usr/src/app/node_modules/ecc-jsbn/lib/ec doesn’t exist .ts Field ‘browser’ doesn’t contain a valid alias
configuration /usr/src/app/node_modules/ecc-jsbn/lib/ec.ts doesn’t exist .js Field ‘browser’ doesn’t contain
a valid alias configuration /usr/src/app/node_modules/ecc-jsbn/lib/ec.js doesn’t exist .json Field ‘browser’
doesn’t contain a valid alias configuration /usr/src/app/node_modules/ecc-jsbn/lib/ec.json doesn’t exist as
directory /usr/src/app/node_modules/ecc-jsbn/lib/ec doesn’t exist
[/usr/src/app/node_modules/ecc-jsbn/lib/ec] [/usr/src/app/node_modules/ecc-jsbn/lib/ec.ts]
[/usr/src/app/node_modules/ecc-jsbn/lib/ec.js] [/usr/src/app/node_modules/ecc-jsbn/lib/ec.json]
[/usr/src/app/node_modules/ecc-jsbn/lib/ec] @ ./~/sshpk/lib/dhe.js 48:9-35 377:8-34 @ ./~/sshpk/lib/key.js @
./~/sshpk/lib/index.js @ ./~/http-signature/lib/signer.js @ ./~/http-signature/lib/index.js @
./~/request/request.js @ ./~/request/index.js @ ./~/request-promise-native/lib/rp.js @
./~/nem-library/dist/src/infrastructure/AccountHttp.js @ ./~/nem-library/dist/src/infrastrcture.js @
./~/nem-library/dist/index.js @ ./src/providers/nem/nem.provider.ts @ ./src/app/app.module.ts @
./src/app/main.ts,./~/sshpk/lib/formats/ssh-private.js Module not found: Error: Can’t resolve ‘bcrypt-pbkdf’
in ‘/usr/src/app/node_modules/sshpk/lib/formats’ resolve ‘bcrypt-pbkdf’ in
‘/usr/src/app/node_modules/sshpk/lib/formats’ Parsed request is a module using description file:
/usr/src/app/node_modules/sshpk/package.json (relative path: ./lib/formats) Field ‘browser’ doesn’t contain
a valid alias configuration after using description file: /usr/src/app/node_modules/sshpk/package.json
(relative path: ./lib/formats) resolve as module looking for modules in /usr/src/app/node_modules using
description file: /usr/src/app/package.json (relative path: ./node_modules) Field ‘browser’ doesn’t contain
a valid alias configuration after using description file: /usr/src/app/package.json (relative path:
./node_modules) using description file: /usr/src/app/package.json (relative path:
./node_modules/bcrypt-pbkdf) no extension Field ‘browser’ doesn’t contain a valid alias configuration
/usr/src/app/node_modules/bcrypt-pbkdf doesn’t exist .ts Field ‘browser’ doesn’t contain a valid alias
configuration /usr/src/app/node_modules/bcrypt-pbkdf.ts doesn’t exist .js Field ‘browser’ doesn’t contain a
valid alias configuration /usr/src/app/node_modules/bcrypt-pbkdf.js doesn’t exist .json Field ‘browser’
doesn’t contain a valid alias configuration /usr/src/app/node_modules/bcrypt-pbkdf.json doesn’t exist as
directory /usr/src/app/node_modules/bcrypt-pbkdf doesn’t exist [/usr/src/app/node_modules/bcrypt-pbkdf]
[/usr/src/app/node_modules/bcrypt-pbkdf.ts] [/usr/src/app/node_modules/bcrypt-pbkdf.js]
[/usr/src/app/node_modules/bcrypt-pbkdf.json] [/usr/src/app/node_modules/bcrypt-pbkdf] @
./~/sshpk/lib/formats/ssh-private.js 69:12-35 190:12-35 @ ./~/sshpk/lib/key.js @ ./~/sshpk/lib/index.js @
./~/http-signature/lib/signer.js @ ./~/http-signature/lib/index.js @ ./~/request/request.js @
./~/request/index.js @ ./~/request-promise-native/lib/rp.js @
./~/nem-library/dist/src/infrastructure/AccountHttp.js @ ./~/nem-library/dist/src/infrastrcture.js @
./~/nem-library/dist/index.js @ ./src/providers/nem/nem.provider.ts @ ./src/app/app.module.ts @
./src/app/main.ts
Error: ./~/sshpk/lib/dhe.js
Module not found: Error: Can’t resolve ‘ecc-jsbn’ in ‘/usr/src/app/node_modules/sshpk/lib’
resolve ‘ecc-jsbn’ in ‘/usr/src/app/node_modules/sshpk/lib’
Parsed request is a module
using description file: /usr/src/app/node_modules/sshpk/package.json (relative path: ./lib)
Field ‘browser’ doesn’t contain a valid alias configuration
after using description file: /usr/src/app/node_modules/sshpk/package.json (relative path: ./lib)
resolve as module
looking for modules in /usr/src/app/node_modules
using description file: /usr/src/app/package.json (relative path: ./node_modules)
Field ‘browser’ doesn’t contain a valid alias configuration
after using description file: /usr/src/app/package.json (relative path: ./node_modules)
using description file: /usr/src/app/package.json (relative path: ./node_modules/ecc-jsbn)
no extension
Field ‘browser’ doesn’t contain a valid alias configuration
/usr/src/app/node_modules/ecc-jsbn doesn’t exist
.ts
Field ‘browser’ doesn’t contain a valid alias configuration
/usr/src/app/node_modules/ecc-jsbn.ts doesn’t exist
.js
Field ‘browser’ doesn’t contain a valid alias configuration
/usr/src/app/node_modules/ecc-jsbn.js doesn’t exist
.json
Field ‘browser’ doesn’t contain a valid alias configuration
/usr/src/app/node_modules/ecc-jsbn.json doesn’t exist
as directory
/usr/src/app/node_modules/ecc-jsbn doesn’t exist
[/usr/src/app/node_modules/ecc-jsbn]


#2

Same to me at Ionic Pro! I’cant build nothing…


#3

Solved. I did the installation on muy local of not found modules and now the build is running again.


#4

Mine solved too, i did install 2 missing modules. Thanks.

https://www.npmjs.com/package/ecc-jsbn
https://www.npmjs.com/package/bcrypt-pbkdf