Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frontend build failing for me on v2-wails branch #1

Open
gedw99 opened this issue Feb 14, 2022 · 2 comments
Open

frontend build failing for me on v2-wails branch #1

gedw99 opened this issue Feb 14, 2022 · 2 comments

Comments

@gedw99
Copy link

gedw99 commented Feb 14, 2022

mac, go1.17.6

Node.js v17.5.0

npm version
{
apple: '0.0.0',
npm: '8.4.1',
node: '17.5.0',
v8: '9.6.180.15-node.13',
uv: '1.43.0',
zlib: '1.2.11',
brotli: '1.0.9',
ares: '1.18.1',
modules: '102',
nghttp2: '1.46.0',
napi: '8',
llhttp: '6.0.4',
openssl: '1.1.1m',
cldr: '39.0',
icu: '69.1',
tz: '2021a',
unicode: '13.0'
}

makefile:


# https://github.com/marcio199226/ytd/tree/v2-wails

# Desktop app for downloading audio tracks from youtube built with wails & angular

REPO_NAME=ytd

print:

all: f-build b-build

dep:
	git clone [email protected]:marcio199226/ytd.git -b v2-wails
dep-delete:
	rm -rf $(REPO_NAME)

dep-os:
	# wails cli. TODO. modify to correct version as needed
	go install github.com/wailsapp/wails/v2/cmd/wails@latest

	# node and npm assumed
	
f-build:
	cd $(REPO_NAME)/frontend && npm install
	#cd $(REPO_NAME)/frontend && npm run build
f-serve:
	# this builds it. 
	cd $(REPO_NAME)/frontend && npm run serve


b-doctor:
	cd $(REPO_NAME) && wails doctor
b-dev:
	cd $(REPO_NAME) && wails dev
b-serve:
	cd $(REPO_NAME) && wails serve
b-build:
	cd $(REPO_NAME) && wails build
b-dist:
	# mac in this case
	cd $(REPO_NAME) && wails build -platform darwin/arm64 -clean


and running the makefile:

 ytd git:(main) ✗ make dep
git clone [email protected]:marcio199226/ytd.git -b v2-wails
Cloning into 'ytd'...
remote: Enumerating objects: 3214, done.
remote: Counting objects: 100% (3214/3214), done.
remote: Compressing objects: 100% (2204/2204), done.
remote: Total 3214 (delta 1385), reused 2683 (delta 866), pack-reused 0
Receiving objects: 100% (3214/3214), 11.32 MiB | 4.93 MiB/s, done.
Resolving deltas: 100% (1385/1385), done.
➜  ytd git:(main) ✗ make f-build
#cd ytd/frontend && npm run build
➜  ytd git:(main) ✗ make f-build
cd ytd/frontend && npm install
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@angular-devkit/[email protected]',
npm WARN EBADENGINE   required: {
npm WARN EBADENGINE     node: '^12.14.1 || >=14.0.0',
npm WARN EBADENGINE     npm: '^6.11.0 || ^7.5.6',
npm WARN EBADENGINE     yarn: '>= 1.13.0'
npm WARN EBADENGINE   },
npm WARN EBADENGINE   current: { node: 'v17.5.0', npm: '8.4.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@angular-devkit/[email protected]',
npm WARN EBADENGINE   required: {
npm WARN EBADENGINE     node: '^12.14.1 || >=14.0.0',
npm WARN EBADENGINE     npm: '^6.11.0 || ^7.5.6',
npm WARN EBADENGINE     yarn: '>= 1.13.0'
npm WARN EBADENGINE   },
npm WARN EBADENGINE   current: { node: 'v17.5.0', npm: '8.4.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@angular-devkit/[email protected]',
npm WARN EBADENGINE   required: {
npm WARN EBADENGINE     node: '^12.14.1 || >=14.0.0',
npm WARN EBADENGINE     npm: '^6.11.0 || ^7.5.6',
npm WARN EBADENGINE     yarn: '>= 1.13.0'
npm WARN EBADENGINE   },
npm WARN EBADENGINE   current: { node: 'v17.5.0', npm: '8.4.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@angular-devkit/[email protected]',
npm WARN EBADENGINE   required: {
npm WARN EBADENGINE     node: '^12.14.1 || >=14.0.0',
npm WARN EBADENGINE     npm: '^6.11.0 || ^7.5.6',
npm WARN EBADENGINE     yarn: '>= 1.13.0'
npm WARN EBADENGINE   },
npm WARN EBADENGINE   current: { node: 'v17.5.0', npm: '8.4.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@angular-devkit/[email protected]',
npm WARN EBADENGINE   required: {
npm WARN EBADENGINE     node: '^12.14.1 || >=14.0.0',
npm WARN EBADENGINE     npm: '^6.11.0 || ^7.5.6',
npm WARN EBADENGINE     yarn: '>= 1.13.0'
npm WARN EBADENGINE   },
npm WARN EBADENGINE   current: { node: 'v17.5.0', npm: '8.4.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@angular-devkit/[email protected]',
npm WARN EBADENGINE   required: {
npm WARN EBADENGINE     node: '^12.14.1 || >=14.0.0',
npm WARN EBADENGINE     npm: '^6.11.0 || ^7.5.6',
npm WARN EBADENGINE     yarn: '>= 1.13.0'
npm WARN EBADENGINE   },
npm WARN EBADENGINE   current: { node: 'v17.5.0', npm: '8.4.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@angular/[email protected]',
npm WARN EBADENGINE   required: {
npm WARN EBADENGINE     node: '^12.14.1 || >=14.0.0',
npm WARN EBADENGINE     npm: '^6.11.0 || ^7.5.6',
npm WARN EBADENGINE     yarn: '>= 1.13.0'
npm WARN EBADENGINE   },
npm WARN EBADENGINE   current: { node: 'v17.5.0', npm: '8.4.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@ngtools/[email protected]',
npm WARN EBADENGINE   required: {
npm WARN EBADENGINE     node: '^12.14.1 || >=14.0.0',
npm WARN EBADENGINE     npm: '^6.11.0 || ^7.5.6',
npm WARN EBADENGINE     yarn: '>= 1.13.0'
npm WARN EBADENGINE   },
npm WARN EBADENGINE   current: { node: 'v17.5.0', npm: '8.4.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@schematics/[email protected]',
npm WARN EBADENGINE   required: {
npm WARN EBADENGINE     node: '^12.14.1 || >=14.0.0',
npm WARN EBADENGINE     npm: '^6.11.0 || ^7.5.6',
npm WARN EBADENGINE     yarn: '>= 1.13.0'
npm WARN EBADENGINE   },
npm WARN EBADENGINE   current: { node: 'v17.5.0', npm: '8.4.1' }
npm WARN EBADENGINE }
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: The
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142

added 1372 packages, and audited 1373 packages in 46s

87 packages are looking for funding
  run `npm fund` for details

60 vulnerabilities (2 low, 50 moderate, 8 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues, run:
  npm audit fix --force

Run `npm audit` for details.
#cd ytd/frontend && npm run build
➜  ytd git:(main) ✗ make b-build 
cd ytd && wails build
Wails CLI v2.0.0-beta.30



App Type:               desktop
Platform:               darwin
Arch:                   amd64
Compiler:               /usr/local/bin/go
Build Mode:             Production
Skip Frontend:          false
Compress:               false
Package:                true
Clean Build Dir:        false
LDFlags:                ""
Tags:                   []

Warning: go.mod is using Wails '2.0.0-alpha.73' but the CLI is 'v2.0.0-beta.30'. Consider updating your project's `go.mod` file.

Installing frontend dependencies: Done.
Compiling frontend:     
    > [email protected] build
    > npx ng build --single-bundle true --output-hashing none --aot --build-optimizer --optimization --allowed-common-js-dependencies
    
    
    Node.js version v17.5.0 detected.
    Odd numbered Node.js versions will not enter LTS status and should not be used for production. For more information, please see https://nodejs.org/en/about/releases/.
    - Generating browser application bundles (phase: setup)...
    An unhandled exception occurred: ENOENT: no such file or directory, stat '/Users/apple/workspace/go/src/github.com/gedw99/fhir-tools/gui/github.com__matryer__xbar/others/ytd/ytd/frontend/dist'
    See "/private/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/ng-XWhTpg/angular-errors.log" for further details.
    


ERROR: exit status 127

If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony

make: *** [b-build] Error 1
➜
@gedw99 gedw99 changed the title frontend build failing for me frontend build failing for me on v2 branch Feb 14, 2022
@gedw99 gedw99 changed the title frontend build failing for me on v2 branch frontend build failing for me on v2-wails branch Feb 14, 2022
@gedw99
Copy link
Author

gedw99 commented Feb 14, 2022

also seems the only way to build the angular code is with "npn run serve"

make f-serve
# this builds it. 
cd ytd/frontend && npm run serve

> [email protected] serve
> npx --max_old_space_size=4096 ng serve --poll=2000 --host=0.0.0.0 --single-bundle --configuration development

Node.js version v17.5.0 detected.
Odd numbered Node.js versions will not enter LTS status and should not be used for production. For more information, please see https://nodejs.org/en/about/releases/.
Warning: This is a simple server for use in testing or debugging Angular applications
locally. It hasn't been reviewed for security issues.

Binding this server to an open connection can result in compromising your application or
computer. Using a different host than the one passed to the "--host" flag might result in
websocket connection issues. You might need to use "--disableHostCheck" if that's the
case.
⠋ Generating browser application bundles (phase: setup)...Compiling @angular/core : es2015 as esm2015
Compiling @angular/cdk/keycodes : es2015 as esm2015
Compiling @angular/animations : es2015 as esm2015
Compiling @angular/common : es2015 as esm2015
Compiling @angular/cdk/observers : es2015 as esm2015
Compiling @angular/animations/browser : es2015 as esm2015
Compiling @angular/platform-browser : es2015 as esm2015
Compiling @angular/cdk/platform : es2015 as esm2015
Compiling @angular/cdk/bidi : es2015 as esm2015
Compiling @angular/cdk/a11y : es2015 as esm2015
Compiling @angular/platform-browser/animations : es2015 as esm2015
Compiling @angular/forms : es2015 as esm2015
Compiling @angular/cdk/collections : es2015 as esm2015
Compiling @angular/cdk/scrolling : es2015 as esm2015
Compiling @angular/cdk/portal : es2015 as esm2015
Compiling @angular/flex-layout/core : es2015 as esm2015
Compiling @angular/cdk/overlay : es2015 as esm2015
Compiling @angular/material/core : es2015 as esm2015
Compiling @angular/common/http : es2015 as esm2015
Compiling @angular/cdk/layout : es2015 as esm2015
Compiling @angular/flex-layout/extended : es2015 as esm2015
Compiling @angular/flex-layout/flex : es2015 as esm2015
Compiling @angular/material/form-field : es2015 as esm2015
Compiling @angular/flex-layout/grid : es2015 as esm2015
Compiling @angular/cdk/text-field : es2015 as esm2015
Compiling @angular/material/button : es2015 as esm2015
Compiling @ngx-translate/core : es2015 as esm2015
Compiling @angular/platform-browser-dynamic : es2015 as esm2015
Compiling @angular/router : es2015 as esm2015
Compiling @angular/material/dialog : es2015 as esm2015
Compiling @angular/material/menu : es2015 as esm2015
Compiling @angular/material/sidenav : es2015 as esm2015
Compiling @angular/core/testing : es2015 as esm2015
Compiling @angular/material/icon : es2015 as esm2015
Compiling @angular/flex-layout : es2015 as esm2015
Compiling @angular/cdk/clipboard : es2015 as esm2015
Compiling @angular/material/badge : es2015 as esm2015
Compiling @angular/material/card : es2015 as esm2015
Compiling @angular/material/checkbox : es2015 as esm2015
Compiling @angular/material/input : es2015 as esm2015
Compiling @angular/material/progress-bar : es2015 as esm2015
Compiling @angular/material/progress-spinner : es2015 as esm2015
Compiling @angular/material/select : es2015 as esm2015
Compiling @angular/material/slide-toggle : es2015 as esm2015
Compiling @angular/material/slider : es2015 as esm2015
Compiling @angular/material/snack-bar : es2015 as esm2015
Compiling @angular/material/tabs : es2015 as esm2015
Compiling @angular/material/toolbar : es2015 as esm2015
Compiling @angular/material/tooltip : es2015 as esm2015
Compiling @tinkoff/ng-event-plugins : es2015 as esm2015
Compiling @ngx-translate/http-loader : es2015 as esm2015
✔ Browser application bundle generation complete.

Initial Chunk Files | Names         |     Size
main.js             | main          |  6.51 MB
styles.css          | styles        | 78.85 kB
polyfills.js        | polyfills     |  2.99 kB

                    | Initial Total |  6.59 MB

Build at: 2022-02-14T15:27:18.385Z - Hash: 82f099f96429f383160c - Time: 105474ms

Warning: /Users/apple/workspace/go/src/github.com/gedw99/fhir-tools/gui/github.com__matryer__xbar/others/ytd/ytd/frontend/node_modules/ng-qrcode/fesm2015/ng-qrcode.js depends on 'qrcode'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Warning: /Users/apple/workspace/go/src/github.com/gedw99/fhir-tools/gui/github.com__matryer__xbar/others/ytd/ytd/frontend/src/app/pages/offline-playlist/offline-playlist.component.ts depends on '@wailsapp/runtime'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Warning: /Users/apple/workspace/go/src/github.com/gedw99/fhir-tools/gui/github.com__matryer__xbar/others/ytd/ytd/frontend/src/main.ts depends on '@wails/runtime'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Warning: /Users/apple/workspace/go/src/github.com/gedw99/fhir-tools/gui/github.com__matryer__xbar/others/ytd/ytd/frontend/src/main.ts depends on 'core-js/stable'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies



Error: src/main.ts:25:7 - error TS2339: Property 'Init' does not exist on type '{ Browser: { Open(target: string): Promise<any>; }; Events: { Emit(eventName: string, data?: any): void; On(eventName: string, callback: (data?: any) => void): void; OnMultiple(eventName: string, callback: (data?: any) => void, maxCallbacks: number): void; Once(eventName: string, callback: (data?: any) => void): voi...'.

25 Wails.Init(() => {
         ~~~~




** Angular Live Development Server is listening on 0.0.0.0:4200, open your browser on http://localhost:4200/ **

✔ Browser application bundle generation complete.

3 unchanged chunks

Build at: 2022-02-14T15:27:36.587Z - Hash: 88e3f7ef3929262d9fdd - Time: 14383ms

Warning: /Users/apple/workspace/go/src/github.com/gedw99/fhir-tools/gui/github.com__matryer__xbar/others/ytd/ytd/frontend/src/app/pages/home/home.component.ts depends on '@wailsapp/runtime'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies



Error: src/main.ts:25:7 - error TS2339: Property 'Init' does not exist on type '{ Browser: { Open(target: string): Promise<any>; }; Events: { Emit(eventName: string, data?: any): void; On(eventName: string, callback: (data?: any) => void): void; OnMultiple(eventName: string, callback: (data?: any) => void, maxCallbacks: number): void; Once(eventName: string, callback: (data?: any) => void): voi...'.

25 Wails.Init(() => {
         ~~~~



^Cmake: *** [f-serve] Interrupt: 2

@marcio199226
Copy link
Owner

marcio199226 commented Feb 14, 2022

Hi, I will check it and let you know.
Anyway I used an early alpha version of v2 wails so if I remember correctly I have made small 1 line changes because Init method hadn't been exported properly from wails.

Also is worth notice that my project uses 2.0.0-alpha.73 and you have installed the latest one (v2.0.0-beta.30)

P.S I will check this evening because I have some other new features and some enhancements not published yet. Recently I had no spare time to work on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants