Closed abixadamj closed 7 years ago
I am using multiple packages from npm. They are described in https://github.com/aroberge/reeborg/blob/master/dev_tools/readme_for_devel.md
I did:
root@rg:/srv/reeborg# curl -sL https://deb.nodesource.com/setup_8.x | bash -
apt-get install -y nodejs
npm install -g browserify
npm install -g tape
npm install -g jsdoc
npm install -g ink-docstrap
npm install -g faucet
npm install -g tap-diff
npm install -g tap-dot
npm install -g tap-spec
npm install -g tap-notify
root@rg:/srv/reeborg# node -v
v8.4.0
root@rg:/srv/reeborg# npm -v
5.3.0
and when I rrun test, I got: root@rg:/srv/reeborg# npm run tests
> reeborg@1.0.0 tests /srv/reeborg
> tape tests/unit_tests/**/*.js | faucet
module.js:491
throw err;
^
Error: Cannot find module 'tape'
at Function.Module._resolveFilename (module.js:489:15)
at Function.Module._load (module.js:439:25)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/srv/reeborg/tests/unit_tests/test_globals.js:1:74)
Can you try:
> npm list -g --depth=0
If I do this, here is what I get:
C:\Users\Andre\AppData\Roaming\npm
+-- browserify@13.1.0
+-- dependo@0.1.6
+-- faucet@0.0.1
+-- gitbook-cli@2.3.2
+-- jshint@2.9.4
+-- madge@1.1.0
+-- npm@5.3.0
+-- tap-dot@1.0.5
+-- tap-notify@1.0.0
+-- tap-spec@4.1.1
`-- tape@4.6.3
Edit: you may need to be root (or use sudo) to install globally on linux.
root@rg:~# npm list -g --depth=0 /usr/lib ├── browserfy@1.0.0 ├── faucet@0.0.1 ├── jsdoc@3.5.4 ├── npm@5.3.0 ├── tap-diff@0.1.1 ├── tap-dot@1.0.5 ├── tap-notify@1.0.0 ├── tap-spec@4.1.1 └── tape@4.8.0
I see that you have "browserfy" which is not the right package; it should be "browserify".
I don't understand why tape would not work.
After installing browserify, you could perhaps use
npm run only-build
This should work in building a proper version - but would not run any test. However, since you are only adding translations, and that no test exists to test your translations, it should be fine.
OK, I see some faults in my job, so I have now:
root@rg:~# npm install -g browserify@latest /usr/bin/browserify -> /usr/lib/node_modules/browserify/bin/cmd.js
and root@rg:/srv/reeborg# npm run only-build
reeborg@1.0.0 only-build /srv/reeborg browserify ./src/js/index.js -o ./build/reeborg.js
events.js:182 throw er; // Unhandled 'error' event ^
Error: ENOENT: no such file or directory, open './build/reeborg.js.tmp-browserify-97495970297327350096'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! reeborg@1.0.0 only-build: browserify ./src/js/index.js -o ./build/reeborg.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the reeborg@1.0.0 only-build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2017-08-29T12_53_34_682Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'run', 'only-build' ]
2 info using npm@5.3.0
3 info using node@v8.4.0
4 verbose run-script [ 'preonly-build', 'only-build', 'postonly-build' ]
5 info lifecycle reeborg@1.0.0~preonly-build: reeborg@1.0.0
6 info lifecycle reeborg@1.0.0~only-build: reeborg@1.0.0
7 verbose lifecycle reeborg@1.0.0~only-build: unsafe-perm in lifecycle true
8 verbose lifecycle reeborg@1.0.0~only-build: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/srv/reeborg/node_modules/.bin:/usr/loca
9 verbose lifecycle reeborg@1.0.0~only-build: CWD: /srv/reeborg
10 silly lifecycle reeborg@1.0.0~only-build: Args: [ '-c', 'browserify ./src/js/index.js -o ./build/reeborg.js' ]
11 silly lifecycle reeborg@1.0.0~only-build: Returned: code: 1 signal: null
12 info lifecycle reeborg@1.0.0~only-build: Failed to exec only-build script
13 verbose stack Error: reeborg@1.0.0 only-build: browserify ./src/js/index.js -o ./build/reeborg.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at EventEmitter.emit (events.js:213:7)
13 verbose stack at ChildProcess.
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at ChildProcess.emit (events.js:213:7)
13 verbose stack at maybeClose (internal/child_process.js:927:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid reeborg@1.0.0
15 verbose cwd /srv/reeborg
16 verbose Linux 3.16.0-4-amd64
17 verbose argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "only-build"
18 verbose node v8.4.0
19 verbose npm v5.3.0
20 error code ELIFECYCLE
21 error errno 1
22 error reeborg@1.0.0 only-build: browserify ./src/js/index.js -o ./build/reeborg.js
22 error Exit status 1
23 error Failed at the reeborg@1.0.0 only-build script.
Perhaps you need to first create a build directory? I might have done that myself and not realize it was a required step. (This is just a guess.)
Yeeeeaaahhh !!!!! mkdir build ;-)
root@rg:/srv/reeborg# npm run only-build
reeborg@1.0.0 only-build /srv/reeborg browserify ./src/js/index.js -o ./build/reeborg.js Working !!!
OK, now I can work with translation.
I have made for on my own server: http://robotyka.cyfrowaszkola.waw.pl I see an error: 188.146.68.197 - - [25/Aug/2017:17:26:58 +0200] "GET /build/reeborg.js HTTP/1.1" 404 525 "http://robotyka.cyfrowaszkola.waw.pl/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"
I have ran python3 easylunch.py and the result is the same - I do not see page as should be. I do not have build directory - how to create it? Please, help me with some info.