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

Advanced compilation fails. #2

Closed
au-phiware opened this issue Sep 2, 2017 · 1 comment
Closed

Advanced compilation fails. #2

au-phiware opened this issue Sep 2, 2017 · 1 comment

Comments

@au-phiware
Copy link
Owner

Problem

Both prod and test profiles compile successfully but produce a runtime TypeError. Furthermore, test does not render any source map support :(

Steps to reproduce the problem

 lein with-profile prod do npm install, cljsbuild once, start

Excepted output

lein-new@0.1.0-SNAPSHOT ~/lein-new
***snip***
Compiling ClojureScript...
***snip***
> lein-new@0.1.0-SNAPSHOT start ~/lein-new
> node target/prod/server/js/out.js

Listening on port 3000

Actual output

lein-new@0.1.0-SNAPSHOT ~/lein-new
├─┬ @cljs-oss/module-deps@1.1.1 
│ ├─┬ babel-traverse@6.26.0 
│ │ ├─┬ babel-code-frame@6.26.0 
│ │ │ ├─┬ chalk@1.1.3 
│ │ │ │ ├── ansi-styles@2.2.1 
│ │ │ │ ├── escape-string-regexp@1.0.5 
│ │ │ │ ├─┬ has-ansi@2.0.0 
│ │ │ │ │ └── ansi-regex@2.1.1 
│ │ │ │ ├── strip-ansi@3.0.1 
│ │ │ │ └── supports-color@2.0.0 
│ │ │ ├── esutils@2.0.2 
│ │ │ └── js-tokens@3.0.2 
│ │ ├── babel-messages@6.23.0 
│ │ ├─┬ babel-runtime@6.26.0 
│ │ │ ├── core-js@2.5.1 
│ │ │ └── regenerator-runtime@0.11.0 
│ │ ├─┬ babel-types@6.26.0 
│ │ │ └── to-fast-properties@1.0.3 
│ │ ├── globals@9.18.0 
│ │ ├─┬ invariant@2.2.2 
│ │ │ └── loose-envify@1.3.1 
│ │ └── lodash@4.17.4 
│ ├── babylon@6.18.0 
│ ├─┬ browser-resolve@1.11.2 
│ │ └── resolve@1.1.7 
│ ├── cached-path-relative@1.0.1 
│ ├─┬ concat-stream@1.5.2 
│ │ ├─┬ readable-stream@2.0.6 
│ │ │ └── string_decoder@0.10.31 
│ │ └── typedarray@0.0.6 
│ ├── defined@1.0.0 
│ ├─┬ detective@4.5.0 
│ │ └── acorn@4.0.13 
│ ├── duplexer2@0.1.4 
│ ├─┬ enhanced-resolve@3.4.1 
│ │ ├── graceful-fs@4.1.11 
│ │ ├─┬ memory-fs@0.4.1 
│ │ │ └─┬ errno@0.1.4 
│ │ │   └── prr@0.0.0 
│ │ ├── object-assign@4.1.1 
│ │ └── tapable@0.2.8 
│ ├── inherits@2.0.3 
│ ├─┬ JSONStream@1.3.1 
│ │ ├── jsonparse@1.3.1 
│ │ └── through@2.3.8 
│ ├── konan@1.1.0 
│ ├─┬ parents@1.0.1 
│ │ └── path-platform@0.11.15 
│ ├─┬ readable-stream@2.3.3 
│ │ ├── core-util-is@1.0.2 
│ │ ├── isarray@1.0.0 
│ │ ├── process-nextick-args@1.0.7 
│ │ ├── string_decoder@1.0.3 
│ │ └── util-deprecate@1.0.2 
│ ├─┬ resolve@1.4.0 
│ │ └── path-parse@1.0.5 
│ ├── stream-combiner2@1.1.1 
│ ├─┬ subarg@1.0.0 
│ │ └── minimist@1.2.0 
│ ├── through2@2.0.3 
│ └── xtend@4.0.1 
├─┬ express@4.15.4 
│ ├─┬ accepts@1.3.4 
│ │ ├─┬ mime-types@2.1.17 
│ │ │ └── mime-db@1.30.0 
│ │ └── negotiator@0.6.1 
│ ├── array-flatten@1.1.1 
│ ├── content-disposition@0.5.2 
│ ├── content-type@1.0.2 
│ ├── cookie@0.3.1 
│ ├── cookie-signature@1.0.6 
│ ├─┬ debug@2.6.8 
│ │ └── ms@2.0.0 
│ ├── depd@1.1.1 
│ ├── encodeurl@1.0.1 
│ ├── escape-html@1.0.3 
│ ├── etag@1.8.0 
│ ├─┬ finalhandler@1.0.4 
│ │ └── unpipe@1.0.0 
│ ├── fresh@0.5.0 
│ ├── merge-descriptors@1.0.1 
│ ├── methods@1.1.2 
│ ├─┬ on-finished@2.3.0 
│ │ └── ee-first@1.1.1 
│ ├── parseurl@1.3.1 
│ ├── path-to-regexp@0.1.7 
│ ├─┬ proxy-addr@1.1.5 
│ │ ├── forwarded@0.1.0 
│ │ └── ipaddr.js@1.4.0 
│ ├── qs@6.5.0 
│ ├── range-parser@1.2.0 
│ ├─┬ send@0.15.4 
│ │ ├── destroy@1.0.4 
│ │ ├── http-errors@1.6.2 
│ │ └── mime@1.3.4 
│ ├── setprototypeof@1.0.3 
│ ├── statuses@1.3.1 
│ ├─┬ type-is@1.6.15 
│ │ └── media-typer@0.3.0 
│ ├── utils-merge@1.0.0 
│ └── vary@1.1.1 
├── serve-static@1.12.4 
├─┬ source-map-support@0.4.16 
│ └── source-map@0.5.7 
└─┬ ws@3.1.0 
  ├── safe-buffer@5.1.1 
  └── ultron@1.1.0 

Compiling ClojureScript...
Compiling ["target/prod/server/js/out.js"] from ("src/server" "src/common" "env/prod/server")...
Successfully compiled ["target/prod/server/js/out.js"] in 13.887 seconds.
Compiling ["target/prod/client/js/out.js"] from ("src/client" "src/common" "env/prod/client")...
Successfully compiled ["target/prod/client/js/out.js"] in 8.486 seconds.

> lein-new@0.1.0-SNAPSHOT start ~/lein-new
> node target/prod/server/js/out.js


~/lein-new/target/prod/server/js/out.js:293
function qh(a,b,c){var d=null!=b&&(b.i&64||t===b.la)?Ae(fg,b):b,e=K.b(d,Pg);b=K.b(d,Tg);var g=K.b(d,Wg);if(x(Gg.a(g)))return null;try{var h=e.g?e.g():e.call(null);Ne.h(c,zd,a);var k=h}catch(l){throw b=l,[D.a(["could not start [",D.a(a),"] due to"].join(""))," ",D.a(b)].join("");}c=k;d=null!=d&&(d.i&64||t===d.la)?Ae(fg,d):d;d=K.b(d,Kg);Me(d,c);Ne.F(nh,Cd,a,new v(null,1,[Tg,b],null));return ph(new Y(null,2,5,De,[a,Wg],null),new ng(null,new v(null,1,[Gg,null],null),null))}
                                                                                                                                                                                                 ^
could not start [#'lein-new.core/server] due to TypeError: (intermediate value)(intermediate value)(...).use(...).get(...).Zc is not a function

npm ERR! Linux 4.10.0-stable
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! node v6.9.4
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! lein-new@0.1.0-SNAPSHOT start: `node target/prod/server/js/out.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the lein-new@0.1.0-SNAPSHOT start script 'node target/prod/server/js/out.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the lein-new package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node target/prod/server/js/out.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs lein-new
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls lein-new
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     ~/lein-new/npm-debug.log
Error encountered performing task 'do' with profile(s): 'prod'
Suppressed exit
@au-phiware
Copy link
Owner Author

After adding externs, type error still occurs:

lein-new@0.1.0-SNAPSHOT /home/corin/Projects/GitHub/lein-new
├─┬ @cljs-oss/module-deps@1.1.1 
│ ├─┬ babel-traverse@6.26.0 
│ │ ├─┬ babel-code-frame@6.26.0 
│ │ │ ├─┬ chalk@1.1.3 
│ │ │ │ ├── ansi-styles@2.2.1 
│ │ │ │ ├── escape-string-regexp@1.0.5 
│ │ │ │ ├─┬ has-ansi@2.0.0 
│ │ │ │ │ └── ansi-regex@2.1.1 
│ │ │ │ ├── strip-ansi@3.0.1 
│ │ │ │ └── supports-color@2.0.0 
│ │ │ ├── esutils@2.0.2 
│ │ │ └── js-tokens@3.0.2 
│ │ ├── babel-messages@6.23.0 
│ │ ├─┬ babel-runtime@6.26.0 
│ │ │ ├── core-js@2.5.1 
│ │ │ └── regenerator-runtime@0.11.0 
│ │ ├─┬ babel-types@6.26.0 
│ │ │ └── to-fast-properties@1.0.3 
│ │ ├── globals@9.18.0 
│ │ ├─┬ invariant@2.2.2 
│ │ │ └── loose-envify@1.3.1 
│ │ └── lodash@4.17.4 
│ ├── babylon@6.18.0 
│ ├─┬ browser-resolve@1.11.2 
│ │ └── resolve@1.1.7 
│ ├── cached-path-relative@1.0.1 
│ ├─┬ concat-stream@1.5.2 
│ │ ├─┬ readable-stream@2.0.6 
│ │ │ └── string_decoder@0.10.31 
│ │ └── typedarray@0.0.6 
│ ├── defined@1.0.0 
│ ├─┬ detective@4.5.0 
│ │ └── acorn@4.0.13 
│ ├── duplexer2@0.1.4 
│ ├─┬ enhanced-resolve@3.4.1 
│ │ ├── graceful-fs@4.1.11 
│ │ ├─┬ memory-fs@0.4.1 
│ │ │ └─┬ errno@0.1.4 
│ │ │   └── prr@0.0.0 
│ │ ├── object-assign@4.1.1 
│ │ └── tapable@0.2.8 
│ ├── inherits@2.0.3 
│ ├─┬ JSONStream@1.3.1 
│ │ ├── jsonparse@1.3.1 
│ │ └── through@2.3.8 
│ ├── konan@1.1.0 
│ ├─┬ parents@1.0.1 
│ │ └── path-platform@0.11.15 
│ ├─┬ readable-stream@2.3.3 
│ │ ├── core-util-is@1.0.2 
│ │ ├── isarray@1.0.0 
│ │ ├── process-nextick-args@1.0.7 
│ │ ├── string_decoder@1.0.3 
│ │ └── util-deprecate@1.0.2 
│ ├─┬ resolve@1.4.0 
│ │ └── path-parse@1.0.5 
│ ├── stream-combiner2@1.1.1 
│ ├─┬ subarg@1.0.0 
│ │ └── minimist@1.2.0 
│ ├── through2@2.0.3 
│ └── xtend@4.0.1 
├── closurecompiler-externs@1.0.4 
├─┬ express@4.15.4 
│ ├─┬ accepts@1.3.4 
│ │ ├─┬ mime-types@2.1.17 
│ │ │ └── mime-db@1.30.0 
│ │ └── negotiator@0.6.1 
│ ├── array-flatten@1.1.1 
│ ├── content-disposition@0.5.2 
│ ├── content-type@1.0.2 
│ ├── cookie@0.3.1 
│ ├── cookie-signature@1.0.6 
│ ├─┬ debug@2.6.8 
│ │ └── ms@2.0.0 
│ ├── depd@1.1.1 
│ ├── encodeurl@1.0.1 
│ ├── escape-html@1.0.3 
│ ├── etag@1.8.0 
│ ├─┬ finalhandler@1.0.4 
│ │ └── unpipe@1.0.0 
│ ├── fresh@0.5.0 
│ ├── merge-descriptors@1.0.1 
│ ├── methods@1.1.2 
│ ├─┬ on-finished@2.3.0 
│ │ └── ee-first@1.1.1 
│ ├── parseurl@1.3.1 
│ ├── path-to-regexp@0.1.7 
│ ├─┬ proxy-addr@1.1.5 
│ │ ├── forwarded@0.1.0 
│ │ └── ipaddr.js@1.4.0 
│ ├── qs@6.5.0 
│ ├── range-parser@1.2.0 
│ ├─┬ send@0.15.4 
│ │ ├── destroy@1.0.4 
│ │ ├── http-errors@1.6.2 
│ │ └── mime@1.3.4 
│ ├── serve-static@1.12.4 
│ ├── setprototypeof@1.0.3 
│ ├── statuses@1.3.1 
│ ├─┬ type-is@1.6.15 
│ │ └── media-typer@0.3.0 
│ ├── utils-merge@1.0.0 
│ └── vary@1.1.1 
├─┬ source-map-support@0.4.16 
│ └── source-map@0.5.7 
└─┬ ws@3.1.0 
  ├── safe-buffer@5.1.1 
  └── ultron@1.1.0 

Compiling ClojureScript...
Compiling ["target/prod/server/js/out.js"] from ("src/server" "src/common" "env/prod/server")...
Successfully compiled ["target/prod/server/js/out.js"] in 13.929 seconds.
Compiling ["target/prod/client/js/out.js"] from ("src/client" "src/common" "env/prod/client")...
Successfully compiled ["target/prod/client/js/out.js"] in 7.987 seconds.

> lein-new@0.1.0-SNAPSHOT start /home/corin/Projects/GitHub/lein-new
> node target/prod/server/js/out.js


/home/corin/Projects/GitHub/lein-new/target/prod/server/js/out.js:293
function qh(a,b,c){var d=null!=b&&(b.i&64||t===b.la)?Ae(fg,b):b,e=K.b(d,Pg);b=K.b(d,Tg);var g=K.b(d,Wg);if(x(Gg.a(g)))return null;try{var h=e.g?e.g():e.call(null);Ne.h(c,zd,a);var k=h}catch(l){throw b=l,[D.a(["could not start [",D.a(a),"] due to"].join(""))," ",D.a(b)].join("");}c=k;d=null!=d&&(d.i&64||t===d.la)?Ae(fg,d):d;d=K.b(d,Kg);Me(d,c);Ne.F(nh,Cd,a,new v(null,1,[Tg,b],null));return ph(new Y(null,2,5,De,[a,Wg],null),new ng(null,new v(null,1,[Gg,null],null),null))}
                                                                                                                                                                                                 ^
could not start [#'lein-new.core/server] due to TypeError: (intermediate value)(intermediate value)(intermediate value).use(...).get(...).Zc is not a function

npm ERR! Linux 4.10.0-stable
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! node v6.9.4
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! lein-new@0.1.0-SNAPSHOT start: `node target/prod/server/js/out.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the lein-new@0.1.0-SNAPSHOT start script 'node target/prod/server/js/out.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the lein-new package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node target/prod/server/js/out.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs lein-new
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls lein-new
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/corin/Projects/GitHub/lein-new/npm-debug.log
Error encountered performing task 'do' with profile(s): 'prod'
Suppressed exit

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

1 participant