suttacentral / bilara

Our Computer Aided Translation software
10 stars 8 forks source link

Issue installing polymer-cli and running local dev environment #44

Closed guimaluf closed 4 years ago

guimaluf commented 5 years ago

I had two issues while trying to run bilara.

  1. While installing polymer-cli
    
    # npm install -g polymer-cli
    /usr/bin/polymer -> /usr/lib64/node_modules/polymer-cli/bin/polymer.js

wd@1.11.2 install /usr/lib64/node_modules/polymer-cli/node_modules/wd node scripts/build-browser-scripts

/usr/lib64/node_modules/polymer-cli/node_modules/mkdirp/index.js:90 throw err0; ^

Error: EACCES: permission denied, mkdir '/usr/lib64/node_modules/polymer-cli/node_modules/wd/build' at Object.mkdirSync (fs.js:839:3) at sync (/usr/lib64/node_modules/polymer-cli/node_modules/mkdirp/index.js:71:13) at Object. (/usr/lib64/node_modules/polymer-cli/node_modules/wd/scripts/build-browser-scripts.js:6:1) at Module._compile (internal/modules/cjs/loader.js:971:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1011:10) at Module.load (internal/modules/cjs/loader.js:822:32) at Function.Module._load (internal/modules/cjs/loader.js:730:14) at Function.Module.runMain (internal/modules/cjs/loader.js:1051:12) at internal/main/run_main_module.js:16:11 { errno: -13, syscall: 'mkdir', code: 'EACCES', path: '/usr/lib64/node_modules/polymer-cli/node_modules/wd/build' } npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/polymer-cli/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! wd@1.11.2 install: node scripts/build-browser-scripts npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the wd@1.11.2 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-11-05T13_38_27_851Z-debug.log


Fixit with 

npm install -g polymer-cli --allow-root --unsafe-perm=true


2.  While running `npm run dev`

npm run dev ✭ ✱

pwa-starter-kit@0.9.0 dev /home/guimaluf/workspace/personal/dharma.org.br/bilara/client npm run start | npm run watch

pwa-starter-kit@0.9.0 watch /home/guimaluf/workspace/personal/dharma.org.br/bilara/client browser-sync start --proxy localhost:8081 --files "*/.js"

[Browsersync] Proxying: http://localhost:8081 [Browsersync] Access URLs:

   Local: http://localhost:3000
External: http://192.168.15.2:3000

      UI: http://localhost:3001

UI External: http://localhost:3001

[Browsersync] Watching files... events.js:187 throw er; // Unhandled 'error' event ^

Error: ENOSPC: System limit for number of file watchers reached, watch '/home/guimaluf/workspace/personal/dharma.org.br/bilara/client/node_modules/table-layout/lib/rows.js' at FSWatcher. (internal/fs/watchers.js:165:26) at Object.watch (fs.js:1345:34) at createFsWatchInstance (/home/guimaluf/workspace/personal/dharma.org.br/bilara/client/node_modules/chokidar/lib/nodefs-handler.js:38:15) at setFsWatchListener (/home/guimaluf/workspace/personal/dharma.org.br/bilara/client/node_modules/chokidar/lib/nodefs-handler.js:81:15) at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/guimaluf/workspace/personal/dharma.org.br/bilara/client/node_modules/chokidar/lib/nodefs-handler.js:233:14) at FSWatcher.NodeFsHandler._handleFile (/home/guimaluf/workspace/personal/dharma.org.br/bilara/client/node_modules/chokidar/lib/nodefs-handler.js:262:21) at FSWatcher. (/home/guimaluf/workspace/personal/dharma.org.br/bilara/client/node_modules/chokidar/lib/nodefs-handler.js:495:21) at FSReqCallback.oncomplete (fs.js:159:5) Emitted 'error' event on FSWatcher instance at: at FSWatcher._handleError (/home/guimaluf/workspace/personal/dharma.org.br/bilara/client/node_modules/chokidar/index.js:260:10) at createFsWatchInstance (/home/guimaluf/workspace/personal/dharma.org.br/bilara/client/node_modules/chokidar/lib/nodefs-handler.js:40:5) at setFsWatchListener (/home/guimaluf/workspace/personal/dharma.org.br/bilara/client/node_modules/chokidar/lib/nodefs-handler.js:81:15) [... lines matching original stack trace ...] at FSReqCallback.oncomplete (fs.js:159:5) { errno: -28, syscall: 'watch', code: 'ENOSPC', path: '/home/guimaluf/workspace/personal/dharma.org.br/bilara/client/node_modules/table-layout/lib/rows.js', filename: '/home/guimaluf/workspace/personal/dharma.org.br/bilara/client/node_modules/table-layout/lib/rows.js' } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! pwa-starter-kit@0.9.0 watch: browser-sync start --proxy localhost:8081 --files "**/*.js" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pwa-starter-kit@0.9.0 watch script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/guimaluf/.npm/_logs/2019-11-05T13_43_35_470Z-debug.log


Fix it temporarily with. For a [permanent solution](https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers)

sysctl fs.inotify.max_user_watches=524288

sysctl -p

guimaluf commented 5 years ago

I have managed to run a local instance but I can't login.

Seems like there is no local route to auth/?AUTH_PARAMS..

sujato commented 5 years ago

I’m also getting bugs on my local install, so I’m not sure I can help out, except to say that when running locally you should be able to see and edit “dummy” instances of the data, but you can’t connect to the actual bilara-data repo.

Anyway, happy to see you’re interested!

sujato commented 4 years ago

This issue seems to be resolved.