bleenco / bterm

NOT MAINTAINED - cross-platform terminal emulator
MIT License
43 stars 9 forks source link

Building on OS/X broken #160

Closed MisterTea closed 6 years ago

MisterTea commented 6 years ago
➜  bterm git:(master) npm start               

> bterm@2.0.0 start /Users/jjg/github/bterm
> npm run postinstall:electron && npm-run-all -p ng:serve electron:serve

> bterm@2.0.0 postinstall:electron /Users/jjg/github/bterm
> node postinstall

> bterm@2.0.0 ng:serve /Users/jjg/github/bterm
> ng serve

> bterm@2.0.0 electron:serve /Users/jjg/github/bterm
> wait-on http-get://localhost:4200/ && npm run electron:tsc && electron . --serve

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
 11% building modules 9/10 modules 1 active …bpack/hot sync nonrecursive /^\.\/log$/ℹ 「wdm」: wait until bundle finished: /
                                                                              u Date: 2018-09-10T20:18:13.991Z
Hash: 475757799829b9524ff6
Time: 5309ms
chunk {main} main.js, main.js.map (main) 2.74 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 1.1 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.22 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 23.6 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 271 kB [initial] [rendered]

ERROR in ./src/main.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: Angular Compiler was detected but it was an instance of the wrong class.
This likely means you have several @ngtools/webpack packages installed. You can check this with `npm ls @ngtools/webpack`, and then remove the extra copies.
    at Object.ngcLoader (/Users/jjg/github/bterm/node_modules/@ngtools/webpack/src/loader.js:33:15)
ERROR in ./src/polyfills.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: Angular Compiler was detected but it was an instance of the wrong class.
This likely means you have several @ngtools/webpack packages installed. You can check this with `npm ls @ngtools/webpack`, and then remove the extra copies.
    at Object.ngcLoader (/Users/jjg/github/bterm/node_modules/@ngtools/webpack/src/loader.js:33:15)
ℹ 「wdm」: Failed to compile.
jkuri commented 6 years ago

hi @MisterTea, I just tried with a fresh clone and it works for me. can you try rm -rf node_moduleas && npm install then start again?

jkuri commented 6 years ago

Btw I was building on Node.JS version 10.x.x, use nvm.sh to install latest version of node.

MisterTea commented 6 years ago

hmm, still can't get it to work. Install works fine but start is broken

➜  bterm git:(master) node --version
v10.8.0
➜  bterm git:(master) npm install

> fsevents@1.2.4 install /Users/jjg/github/bterm/node_modules/fsevents
> node install

[fsevents] Success: "/Users/jjg/github/bterm/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile

> node-sass@4.9.3 install /Users/jjg/github/bterm/node_modules/node-sass
> node scripts/install.js

Cached binary found at /Users/jjg/.npm/node-sass/4.9.3/darwin-x64-64_binding.node

> electron-chromedriver@1.8.0 install /Users/jjg/github/bterm/node_modules/electron-chromedriver
> node ./download-chromedriver.js

successfully dowloaded and extracted!

> node-pty@0.7.7 install /Users/jjg/github/bterm/node_modules/node-pty
> node scripts/install.js

  CXX(target) Release/obj.target/pty/src/unix/pty.o
../src/unix/pty.cc:154:25: warning: 'Utf8Value' is deprecated [-Wdeprecated-declarations]
  v8::String::Utf8Value file(info[0]->ToString());
                        ^
/Users/jjg/.node-gyp/10.8.0/include/node/v8.h:2851:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/jjg/.node-gyp/10.8.0/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/unix/pty.cc:165:27: warning: 'Utf8Value' is deprecated [-Wdeprecated-declarations]
    v8::String::Utf8Value arg(argv_->Get(Nan::New<v8::Integer>(i))->ToString());
                          ^
/Users/jjg/.node-gyp/10.8.0/include/node/v8.h:2851:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/jjg/.node-gyp/10.8.0/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/unix/pty.cc:176:27: warning: 'Utf8Value' is deprecated [-Wdeprecated-declarations]
    v8::String::Utf8Value pair(env_->Get(Nan::New<v8::Integer>(i))->ToString());
                          ^
/Users/jjg/.node-gyp/10.8.0/include/node/v8.h:2851:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/jjg/.node-gyp/10.8.0/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/unix/pty.cc:181:25: warning: 'Utf8Value' is deprecated [-Wdeprecated-declarations]
  v8::String::Utf8Value cwd_(info[3]->ToString());
                        ^
/Users/jjg/.node-gyp/10.8.0/include/node/v8.h:2851:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/jjg/.node-gyp/10.8.0/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/unix/pty.cc:389:25: warning: 'Utf8Value' is deprecated [-Wdeprecated-declarations]
  v8::String::Utf8Value tty_(info[1]->ToString());
                        ^
/Users/jjg/.node-gyp/10.8.0/include/node/v8.h:2851:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/jjg/.node-gyp/10.8.0/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/unix/pty.cc:489:21: warning: 'Call' is deprecated [-Wdeprecated-declarations]
  Nan::Callback(cb).Call(Nan::GetCurrentContext()->Global(), 2, argv);
                    ^
../../nan/nan.h:1595:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
6 warnings generated.
  SOLINK_MODULE(target) Release/pty.node

> node-sass@4.9.3 postinstall /Users/jjg/github/bterm/node_modules/node-sass
> node scripts/build.js

Binary found at /Users/jjg/github/bterm/node_modules/node-sass/vendor/darwin-x64-64/binding.node
Testing binary
Binary is fine

> electron@2.0.5 postinstall /Users/jjg/github/bterm/node_modules/electron
> node install.js

> node-pty@0.7.7 postinstall /Users/jjg/github/bterm/node_modules/node-pty
> node scripts/post-install.js

> bterm@2.0.0 postinstall /Users/jjg/github/bterm
> npm run postinstall:electron && npx electron-builder install-app-deps

> bterm@2.0.0 postinstall:electron /Users/jjg/github/bterm
> node postinstall

  • electron-builder version=20.26.0
  • loaded configuration file=/Users/jjg/github/bterm/electron-builder.json
  • rebuilding native production dependencies platform=darwin arch=x64
added 1923 packages from 1531 contributors and audited 39112 packages in 35.099s
found 36 vulnerabilities (6 low, 22 moderate, 8 high)
  run `npm audit fix` to fix them, or `npm audit` for details
➜  bterm git:(master) npm start

> bterm@2.0.0 start /Users/jjg/github/bterm
> npm run postinstall:electron && npm-run-all -p ng:serve electron:serve

> bterm@2.0.0 postinstall:electron /Users/jjg/github/bterm
> node postinstall

> bterm@2.0.0 ng:serve /Users/jjg/github/bterm
> ng serve

> bterm@2.0.0 electron:serve /Users/jjg/github/bterm
> wait-on http-get://localhost:4200/ && npm run electron:tsc && electron . --serve

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
 11% building modules 12/13 modules 1 active …rs/jjg/github/bterm/src/styles/app.sassℹ 「wdm」: wait until bundle finished: /

Date: 2018-09-10T22:25:54.404Z
Hash: 475757799829b9524ff6
Time: 4602ms
chunk {main} main.js, main.js.map (main) 2.74 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 1.1 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.22 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 23.6 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 271 kB [initial] [rendered]

ERROR in ./src/main.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: Angular Compiler was detected but it was an instance of the wrong class.
This likely means you have several @ngtools/webpack packages installed. You can check this with `npm ls @ngtools/webpack`, and then remove the extra copies.
    at Object.ngcLoader (/Users/jjg/github/bterm/node_modules/@ngtools/webpack/src/loader.js:33:15)
ERROR in ./src/polyfills.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: Angular Compiler was detected but it was an instance of the wrong class.
This likely means you have several @ngtools/webpack packages installed. You can check this with `npm ls @ngtools/webpack`, and then remove the extra copies.
    at Object.ngcLoader (/Users/jjg/github/bterm/node_modules/@ngtools/webpack/src/loader.js:33:15)
ℹ 「wdm」: Failed to compile.

> bterm@2.0.0 electron:tsc /Users/jjg/github/bterm
> tsc main.ts

Electron could not be found. No hard resets for you!
2018-09-10 15:25:58.388 Electron[24938:267653] *** WARNING: Textured window <AtomNSWindow: 0x7feb0ca61100> is getting an implicitly transparent titlebar. This will break when linking against newer SDKs. Use NSWindow's -titlebarAppearsTransparent=YES instead.
jkuri commented 6 years ago

interesting. From your error log I assume this can help:

This likely means you have several @ngtools/webpack packages installed. You can check this with npm ls @ngtools/webpack, and then remove the extra copies.

or maybe easier method, try installing npm packages with yarn instead of npm. additionaly, please check that you are on commit hash dafcc4f, I tried build from that commit.

MisterTea commented 6 years ago

yarn && yarn start works fine! Maybe change the instructions to use yarn?