Failed build on Ionic 2 app in use of woocommerce-api: Error: ./node_modules/sshpk/lib/formats/ssh-private.js Module not found: Error: Can't resolve 'bcrypt-pbkdf'...


#1

Hello, I get the following error in the Ionic Pro (below); I could identify what it is with the use of woocommerce-api, for example, this:

this.WooCommerce = WooCommerceAPI({
url: ‘https://mysite.com/’,
consumerKey: ‘ck_…’,
consumerSecret: ‘cs_…’,
wpAPI: true,
version: ‘wc/v2’
});

this.WooCommerce.getAsync(“products”).then( (data) => {
console.dir(JSON.parse(data.body));
loading.dismiss();
this.products = JSON.parse(data.body);
// this.items = this.filterProduct(‘Boy Products’);
}, (err) => {
console.log(err);
});

When I delete this section of code, everything works fine, but when I add it, it comes out in the Build Log:

Build failed
 
Running with gitlab-ci-multi-runner 9.1.0 (0118d89)
  on ip-10-2-0-213 (c9648220)
Using Shell executor...
Running on ip-10-2-0-213...
Cloning repository...
Cloning into '/home/gitlab-runner/builds/c9648220/0/project-1'...
Checking out 26327967 as master...
Skipping Git submodules setup
$ run "fetch-updates"
Running Stage fetch-updates for Job: 5180108
Checking for build process updates...
$ run "build-app"
Running Stage build-app for Job: 5180108
Parsing ionic.config.json for project settings
Project Settings:
	Name: wootest
	App ID: 0875c283
	Type: ionic-angular
$ npm install --quiet --no-optional

> node-sass@4.5.3 install /usr/src/app/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.3/linux-x64-57_binding.node
Download complete
Binary saved to /usr/src/app/node_modules/node-sass/vendor/linux-x64-57/binding.node
Caching binary to /home/gitlab-runner/.npm/node-sass/4.5.3/linux-x64-57_binding.node

> uglifyjs-webpack-plugin@0.4.6 postinstall /usr/src/app/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js


> node-sass@4.5.3 postinstall /usr/src/app/node_modules/node-sass
> node scripts/build.js

Binary found at /usr/src/app/node_modules/node-sass/vendor/linux-x64-57/binding.node
Testing binary
Binary is fine
added 545 packages in 22.754s
$ npm install --quiet --no-optional success
$ npm run build
npm info it worked if it ends with ok
npm info using npm@5.3.0
npm info using node@v8.2.1
npm info lifecycle wootest@0.0.1~prebuild: wootest@0.0.1
npm info lifecycle wootest@0.0.1~build: wootest@0.0.1

> wootest@0.0.1 build /usr/src/app
> ionic-app-scripts build

[16:29:23]  ionic-app-scripts 3.1.6 
[16:29:23]  build dev started ... 
[16:29:23]  clean started ... 
[16:29:23]  clean finished in 1 ms 
[16:29:23]  copy started ... 
[16:29:23]  deeplinks started ... 
[16:29:23]  deeplinks finished in 37 ms 
[16:29:23]  transpile started ... 
[16:29:27]  transpile finished in 3.39 s 
[16:29:27]  preprocess started ... 
[16:29:27]  preprocess finished in 1 ms 
[16:29:27]  webpack started ... 
[16:29:27]  copy finished in 3.61 s 
[16:29:36]  ionic-app-script task: "build" 
[16:29:36]  Error: ./node_modules/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] @ 
            ./node_modules/sshpk/lib/formats/ssh-private.js 69:12-35 190:12-35 @ ./node_modules/sshpk/lib/key.js @ 
            ./node_modules/sshpk/lib/index.js @ ./node_modules/http-signature/lib/signer.js @ 
            ./node_modules/http-signature/lib/index.js @ ./node_modules/request/request.js @ 
            ./node_modules/request/index.js @ ./node_modules/woocommerce-api/index.js @ ./src/pages/home/home.ts @ 
            ./src/app/app.module.ts @ ./src/app/main.ts,./node_modules/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] @ ./node_modules/sshpk/lib/dhe.js 46:11-30 375:10-29 @ 
            ./node_modules/sshpk/lib/key.js @ ./node_modules/sshpk/lib/index.js @ 
            ./node_modules/http-signature/lib/signer.js @ ./node_modules/http-signature/lib/index.js @ 
            ./node_modules/request/request.js @ ./node_modules/request/index.js @ 
            ./node_modules/woocommerce-api/index.js @ ./src/pages/home/home.ts @ ./src/app/app.module.ts @ 
            ./src/app/main.ts,./node_modules/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] @ ./node_modules/sshpk/lib/dhe.js 48:9-35 377:8-34 @ 
            ./node_modules/sshpk/lib/key.js @ ./node_modules/sshpk/lib/index.js @ 
            ./node_modules/http-signature/lib/signer.js @ ./node_modules/http-signature/lib/index.js @ 
            ./node_modules/request/request.js @ ./node_modules/request/index.js @ 
            ./node_modules/woocommerce-api/index.js @ ./src/pages/home/home.ts @ ./src/app/app.module.ts @ 
            ./src/app/main.ts,./node_modules/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] @ ./node_modules/sshpk/lib/dhe.js 
            50:11-26 379:10-25 @ ./node_modules/sshpk/lib/key.js @ ./node_modules/sshpk/lib/index.js @ 
            ./node_modules/http-signature/lib/signer.js @ ./node_modules/http-signature/lib/index.js @ 
            ./node_modules/request/request.js @ ./node_modules/request/index.js @ 
            ./node_modules/woocommerce-api/index.js @ ./src/pages/home/home.ts @ ./src/app/app.module.ts @ 
            ./src/app/main.ts,./node_modules/sshpk/lib/private-key.js Module not found: Error: Can't resolve 'tweetnacl' 
            in '/usr/src/app/node_modules/sshpk/lib' resolve 'tweetnacl' 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/tweetnacl) no extension Field 'browser' doesn't contain a valid alias 
            configuration /usr/src/app/node_modules/tweetnacl doesn't exist .ts Field 'browser' doesn't contain a valid 
            alias configuration /usr/src/app/node_modules/tweetnacl.ts doesn't exist .js Field 'browser' doesn't contain 
            a valid alias configuration /usr/src/app/node_modules/tweetnacl.js doesn't exist .json Field 'browser' 
            doesn't contain a valid alias configuration /usr/src/app/node_modules/tweetnacl.json doesn't exist as 
            directory /usr/src/app/node_modules/tweetnacl doesn't exist [/usr/src/app/node_modules/tweetnacl] 
            [/usr/src/app/node_modules/tweetnacl.ts] [/usr/src/app/node_modules/tweetnacl.js] 
            [/usr/src/app/node_modules/tweetnacl.json] [/usr/src/app/node_modules/tweetnacl] @ 
            ./node_modules/sshpk/lib/private-key.js 92:10-30 112:10-30 @ ./node_modules/sshpk/lib/index.js @ 
            ./node_modules/http-signature/lib/signer.js @ ./node_modules/http-signature/lib/index.js @ 
            ./node_modules/request/request.js @ ./node_modules/request/index.js @ 
            ./node_modules/woocommerce-api/index.js @ ./src/pages/home/home.ts @ ./src/app/app.module.ts @ 
            ./src/app/main.ts,./node_modules/sshpk/lib/dhe.js Module not found: Error: Can't resolve 'tweetnacl' in 
            '/usr/src/app/node_modules/sshpk/lib' resolve 'tweetnacl' in '/usr/src/app/node_modules/sshpk/lib' ... found: Error: 
            Can't resolve 'tweetnacl' in '/usr/src/app/node_modules/sshpk/lib' resolve 'tweetnacl' 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/tweetnacl) no extension Field 
            'browser' doesn't contain a valid alias configuration /usr/src/app/node_modules/tweetnacl doesn't exist .ts 
            Field 'browser' doesn't contain a valid alias configuration /usr/src/app/node_modules/tweetnacl.ts doesn't 
            exist .js Field 'browser' doesn't contain a valid alias configuration /usr/src/app/node_modules/tweetnacl.js 
            doesn't exist .json Field 'browser' doesn't contain a valid alias configuration 
            /usr/src/app/node_modules/tweetnacl.json doesn't exist as directory /usr/src/app/node_modules/tweetnacl 
            doesn't exist [/usr/src/app/node_modules/tweetnacl] [/usr/src/app/node_modules/tweetnacl.ts] 
            [/usr/src/app/node_modules/tweetnacl.js] [/usr/src/app/node_modules/tweetnacl.json] 
            [/usr/src/app/node_modules/tweetnacl] @ ./node_modules/sshpk/lib/ed-compat.js 16:9-29 64:9-29 @ 
            ./node_modules/sshpk/lib/key.js @ ./node_modules/sshpk/lib/index.js @ 
            ./node_modules/http-signature/lib/signer.js @ ./node_modules/http-signature/lib/index.js @ 
            ./node_modules/request/request.js @ ./node_modules/request/index.js @ 
            ./node_modules/woocommerce-api/index.js @ ./src/pages/home/home.ts @ ./src/app/app.module.ts @ 
            ./src/app/main.ts 
Error: ./node_modules/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]
 @ ./node_modules/sshpk/lib/formats/ssh-private.js 69:12-35 190:12-35
 @ ./node_modules/sshpk/lib/key.js
 @ ./node_modules/sshpk/lib/index.js
 @ ./node_modules/http-signature/lib/signer.js
 @ ./node_modules/http-signature/lib/index.js
 @ ./node_modules/request/request.js
 @ ./node_modules/request/index.js
 @ ./node_modules/woocommerce-api/index.js
 @ ./src/pages/home/home.ts
 @ ./src/app/app.module.ts
 @ ./src/app/main.ts,./node_modules/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]
 @ ./node_modules/sshpk/lib/dhe.js 46:11-30 375:10-29
 @ ./node_modules/sshpk/lib/key.js
 @ ./node_modules/sshpk/lib/index.js
 @ ./node_modules/http-signature/lib/signer.js
 @ ./node_modules/http-signature/lib/index.js
 @ ./node_modules/request/request.js
 @ ./node_modules/request/index.js
 @ ./node_modules/woocommerce-api/index.js
 @ ./src/pages/home/home.ts
 @ ./src/app/app.module.ts
 @ ./src/app/main.ts,./node_modules/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]
 @ ./node_modules/sshpk/lib/dhe.js 48:9-35 377:8-34
 @ ./node_modules/sshpk/lib/key.js
 @ ./node_modules/sshpk/lib/index.js
 @ ./node_modules/http-signature/lib/signer.js
 @ ./node_modules/http-signature/lib/index.js
 @ ./node_modules/request/request.js
 @ ./node_modules/request/index.js
 @ ./node_modules/woocommerce-api/index.js
 @ ./src/pages/home/home.ts
 @ ./src/app/app.module.ts
 @ ./src/app/main.ts,./node_modules/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]
 @ ./node_modules/sshpk/lib/dhe.js 50:11-26 379:10-25
 @ ./node_modules/sshpk/lib/key.js
 @ ./node_modules/sshpk/lib/index.js
 @ ./node_modules/http-signature/lib/signer.js
 @ ./node_modules/http-signature/lib/index.js
 @ ./node_modules/request/request.js
 @ ./node_modules/request/index.js
 @ ./node_modules/woocommerce-api/index.js
 @ ./src/pages/home/home.ts
 @ ./src/app/app.module.ts
 @ ./src/app/main.ts,./node_modules/sshpk/lib/private-key.js
Module not found: Error: Can't resolve 'tweetnacl' in '/usr/src/app/node_modules/sshpk/lib'
resolve 'tweetnacl' 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/tweetnacl)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /usr/src/app/node_modules/tweetnacl doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /usr/src/app/node_modules/tweetnacl.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /usr/src/app/node_modules/tweetnacl.js doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              /usr/src/app/node_modules/tweetnacl.json doesn't exist
            as directory
              /usr/src/app/node_modules/tweetnacl doesn't exist
...
 @ ./node_modules/sshpk/lib/dhe.js 79:10-30 321:9-29
 @ ./node_modules/sshpk/lib/key.js
 @ ./node_modules/sshpk/lib/index.js
 @ ./node_modules/http-signature/lib/signer.js
 @ ./node_modules/http-signature/lib/index.js
 @ ./node_modules/request/request.js
 @ ./node_modules/request/index.js
 @ ./node_modules/woocommerce-api/index.js
 @ ./src/pages/home/home.ts
 @ ./src/app/app.module.ts
 @ ./src/app/main.ts,./node_modules/sshpk/lib/ed-compat.js
Module not found: Error: Can't resolve 'tweetnacl' in '/usr/src/app/node_modules/sshpk/lib'
resolve 'tweetnacl' 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/tweetnacl)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /usr/src/app/node_modules/tweetnacl doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /usr/src/app/node_modules/tweetnacl.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /usr/src/app/node_modules/tweetnacl.js doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              /usr/src/app/node_modules/tweetnacl.json doesn't exist
            as directory
              /usr/src/app/node_modules/tweetnacl doesn't exist
[/usr/src/app/node_modules/tweetnacl]
[/usr/src/app/node_modules/tweetnacl.ts]
[/usr/src/app/node_modules/tweetnacl.js]
[/usr/src/app/node_modules/tweetnacl.json]
[/usr/src/app/node_modules/tweetnacl]
 @ ./node_modules/sshpk/lib/ed-compat.js 16:9-29 64:9-29
 @ ./node_modules/sshpk/lib/key.js
 @ ./node_modules/sshpk/lib/index.js
 @ ./node_modules/http-signature/lib/signer.js
 @ ./node_modules/http-signature/lib/index.js
 @ ./node_modules/request/request.js
 @ ./node_modules/request/index.js
 @ ./node_modules/woocommerce-api/index.js
 @ ./src/pages/home/home.ts
 @ ./src/app/app.module.ts
 @ ./src/app/main.ts
    at new BuildError (/usr/src/app/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
    at callback (/usr/src/app/node_modules/@ionic/app-scripts/dist/webpack.js:121:28)
    at emitRecords.err (/usr/src/app/node_modules/webpack/lib/Compiler.js:269:13)
    at Compiler.emitRecords (/usr/src/app/node_modules/webpack/lib/Compiler.js:375:38)
    at emitAssets.err (/usr/src/app/node_modules/webpack/lib/Compiler.js:262:10)
    at applyPluginsAsyncSeries1.err (/usr/src/app/node_modules/webpack/lib/Compiler.js:368:12)
    at next (/usr/src/app/node_modules/tapable/lib/Tapable.js:218:11)
    at Compiler.compiler.plugin (/usr/src/app/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
    at Compiler.applyPluginsAsyncSeries1 (/usr/src/app/node_modules/tapable/lib/Tapable.js:222:13)
    at Compiler.afterEmit (/usr/src/app/node_modules/webpack/lib/Compiler.js:365:9)
npm info lifecycle wootest@0.0.1~build: Failed to exec build script
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! wootest@0.0.1 build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the wootest@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/gitlab-runner/.npm/_logs/2017-12-19T16_29_36_644Z-debug.log
npm run build failed
Running after script...
$ run "clean-up"
Running Stage clean-up for Job: 5180108
ERROR: Job failed: exit status 1
TermsPrivacy Policy© 2017 Drifty Co.  v0.0.434
IonicDocsBlogHelp & SupportStatus

I do not understand what may be happening, I’ve been testing for days until I found out that it was for woocommerce-api, but I do not know what else to do, I hope you help me with a solution, thanks


#2

Were you able to solve the problem ?


#3

Did you solve the issue?