Skip to content

hyperglass build-ui fails with error #74

Closed

Description

@tweippert

hyperglass build-ui fails with an error

Bug Description

2020-09-12 08:48:08.746 | INFO     | hyperglass.util:build_frontend:659 - Starting UI build...
2020-09-12 08:48:08.747 | DEBUG    | hyperglass.util:build_frontend:661 - Created temporary UI config file: '/tmp/hyperglass_1rwyz0qw.json' for build 85008caacc99540c1b72b5c1d524e1b644dea991f2b2177ba26fbf77a93b4487
2020-09-12 08:48:11.960 | ERROR    | hyperglass.util:build_ui:139 - 
Messages:

Errors:
> Build error occurred
Error: Cannot find module './.alias'
Require stack:
- /usr/local/lib/python3.7/dist-packages/hyperglass/ui/next.config.js
- /usr/local/lib/python3.7/dist-packages/hyperglass/ui/node_modules/next/dist/next-server/server/config.js
- /usr/local/lib/python3.7/dist-packages/hyperglass/ui/node_modules/next/dist/build/index.js
- /usr/local/lib/python3.7/dist-packages/hyperglass/ui/node_modules/next/dist/cli/next-build.js
- /usr/local/lib/python3.7/dist-packages/hyperglass/ui/node_modules/next/dist/bin/next
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:893:15)
    at Function.Module._load (internal/modules/cjs/loader.js:743:27)
    at Module.require (internal/modules/cjs/loader.js:965:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/usr/local/lib/python3.7/dist-packages/hyperglass/ui/next.config.js:1:17)
    at Module._compile (internal/modules/cjs/loader.js:1076:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:941:32)
    at Function.Module._load (internal/modules/cjs/loader.js:782:14)
    at Module.require (internal/modules/cjs/loader.js:965:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/local/lib/python3.7/dist-packages/hyperglass/ui/next.config.js',
    '/usr/local/lib/python3.7/dist-packages/hyperglass/ui/node_modules/next/dist/next-server/server/config.js',
    '/usr/local/lib/python3.7/dist-packages/hyperglass/ui/node_modules/next/dist/build/index.js',
    '/usr/local/lib/python3.7/dist-packages/hyperglass/ui/node_modules/next/dist/cli/next-build.js',
    '/usr/local/lib/python3.7/dist-packages/hyperglass/ui/node_modules/next/dist/bin/next'
  ]
}
2020-09-12 08:48:11.962 | ERROR    | hyperglass.util:build_frontend:698 - 
Messages:

Errors:
> Build error occurred
Error: Cannot find module './.alias'
Require stack:
- /usr/local/lib/python3.7/dist-packages/hyperglass/ui/next.config.js
- /usr/local/lib/python3.7/dist-packages/hyperglass/ui/node_modules/next/dist/next-server/server/config.js
- /usr/local/lib/python3.7/dist-packages/hyperglass/ui/node_modules/next/dist/build/index.js
- /usr/local/lib/python3.7/dist-packages/hyperglass/ui/node_modules/next/dist/cli/next-build.js
- /usr/local/lib/python3.7/dist-packages/hyperglass/ui/node_modules/next/dist/bin/next
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:893:15)
    at Function.Module._load (internal/modules/cjs/loader.js:743:27)
    at Module.require (internal/modules/cjs/loader.js:965:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/usr/local/lib/python3.7/dist-packages/hyperglass/ui/next.config.js:1:17)
    at Module._compile (internal/modules/cjs/loader.js:1076:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:941:32)
    at Function.Module._load (internal/modules/cjs/loader.js:782:14)
    at Module.require (internal/modules/cjs/loader.js:965:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/local/lib/python3.7/dist-packages/hyperglass/ui/next.config.js',
    '/usr/local/lib/python3.7/dist-packages/hyperglass/ui/node_modules/next/dist/next-server/server/config.js',
    '/usr/local/lib/python3.7/dist-packages/hyperglass/ui/node_modules/next/dist/build/index.js',
    '/usr/local/lib/python3.7/dist-packages/hyperglass/ui/node_modules/next/dist/cli/next-build.js',
    '/usr/local/lib/python3.7/dist-packages/hyperglass/ui/node_modules/next/dist/bin/next'
  ]
}

Expected behavior

hyperglass should build the ui

Steps to Reproduce

Just run hyperglass build-ui on a fresh debian buster installation (automated install)

Local Configurations

Empty commands and hyperglass yaml file, example device file, nothing changed.

Logs

see above

Environment

Server

| Metric | Value |
| ------ | ----- |
| **hyperglass Version** | **1.0.0-beta.57** |
| **hyperglass Path** | `/etc/hyperglass` |
| **Python Version** | `3.7.3` |
| **Platform Info** | `Linux-4.19.0-10-amd64-x86_64-with-debian-10.5` |
| **CPU Info** | QEMU Virtual CPU version 2.5+ |
| **Logical Cores** | `2` |
| **Physical Cores** | `1` |
| **Processor Speed** | 1.6960709999999999GHz |
| **Total Memory** | 2.09 GB |
| **Memory Utilization** | 19.6% |
| **Total Disk Space** | 18.89 GB |
| **Disk Utilization** | 19.7% |

Activity

  1. tweippert commented on Sep 12, 2020

    @tweippert
    Author

    It seems the .alias.js won't get cloned correctly into the work space, after create it manually from git repo the build works:

    [INFO] 20200912 09:15:01 | hyperglass.util:659 | build_frontend → Starting UI build...
    [DEBUG] 20200912 09:15:01 | hyperglass.util:661 | build_frontend → Created temporary UI config file: '/tmp/hyperglass_kg3ee7g8.json' for build 85008caacc99540c1b72b5c1d524e1b644dea991f2b2177ba26fbf77a93b4487
    [DEBUG] 20200912 09:16:19 | hyperglass.util:680 | build_frontend → Re-initialized node_modules
    [SUCCESS] 20200912 09:16:19 | hyperglass.util:683 | build_frontend → Completed UI build
    [SUCCESS] 20200912 09:16:19 | hyperglass.util:513 | copyfiles → Copied /usr/local/lib/python3.7/dist-packages/hyperglass/images/hyperglass-light.svg
    [SUCCESS] 20200912 09:16:19 | hyperglass.util:513 | copyfiles → Copied /usr/local/lib/python3.7/dist-packages/hyperglass/images/hyperglass-dark.svg
    [SUCCESS] 20200912 09:16:19 | hyperglass.util:513 | copyfiles → Copied /usr/local/lib/python3.7/dist-packages/hyperglass/images/hyperglass-icon.svg
    [DEBUG] 20200912 09:16:19 | hyperglass.util:427 | generate_opengraph → Copied /usr/local/lib/python3.7/dist-packages/hyperglass/images/hyperglass-opengraph.jpg to /etc/hyperglass/static/images
    [DEBUG] 20200912 09:16:19 | hyperglass.util:457 | generate_opengraph → Opengraph image ready at /etc/hyperglass/static/images/opengraph.jpg
    ✅ Completed UI build in production mode
    
    
  2. thatmattlove commented on Sep 16, 2020

    @thatmattlove
    Owner

    I’m not really sure why this happens sometimes (you’re not the first to see this), but I do know that the `.alias.js‘ file is purely a convenience and I’ve actually since found a better way of handling said conscience anyway. This will be fixed in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions