This works fine for a local build, but is problematic when we try to globally install clojurescript (such as via 'npm install -g') because it requires the caller $CWD to be something that is likely to be unnatural (e.g. /usr/lib/node_modules/$pkg). Suggested fix is to replace "path.resolve('.')" with "__dirname".
Environment
None
Attachments
1
28 Mar 2017, 07:38 PM
Activity
Show:
Matt LeeApril 24, 2017 at 8:34 AM
Also see: [CLJS-1444]
Details
Assignee
Unassigned
Unassigned
Reporter
Greg Haskins
Greg Haskins
Priority
Minor
Created March 28, 2017 at 7:11 PM
Updated April 24, 2017 at 8:34 AM
Flag notifications
Something's gone wrongLooks like you've been signed out. Try logging in again.
Something's gone wrong
Looks like you've been signed out. Try logging in again.
The top-level entry point in a :target :nodejs application uses $CWD relative paths to load the bootstrapping. See "path.resolve('.')" here: https://github.com/clojure/clojurescript/blob/296d0a69340e832b92ed742b3cd0304a06bea27f/src/main/clojure/cljs/closure.clj#L1460 for example.
This works fine for a local build, but is problematic when we try to globally install clojurescript (such as via 'npm install -g') because it requires the caller $CWD to be something that is likely to be unnatural (e.g. /usr/lib/node_modules/$pkg). Suggested fix is to replace "path.resolve('.')" with "__dirname".