Laverna / laverna

Laverna is a JavaScript note taking application with Markdown editor and encryption support. Consider it like open source alternative to Evernote.
https://laverna.cc/index.html
Mozilla Public License 2.0
9.18k stars 801 forks source link

missing file: device.min.js (building for Fedora 27) #925

Closed taw00 closed 2 years ago

taw00 commented 6 years ago

I am trying to build v0.7.51 on Fedora 27. I'm getting this error, and I feel like something is skipping over the device.js directory during the build, but I can't seem to figure it out (I am a node.js n00b btw).

Note: I am working with the local install of bower and gulp instead of installing them globally (cuz, global == root which is just not the right way of doing things). Even if I did install them globally (I did attempt that once and then backed out all the changes), I get the same results. This is what I see.

[taw@worker laverna-0.7.51]$ ./node_modules/gulp/bin/gulp.js build
[19:25:34] Using gulpfile ~/x/laverna-0.7.51/gulpfile.js
[19:25:34] Starting 'build'...
[19:25:34] Starting 'clean:dist'...
[19:25:34] Finished 'clean:dist' after 4.21 ms
[19:25:34] Starting 'prism'...
[19:25:34] Starting 'less'...
[19:25:36] Finished 'less' after 1.79 s
[19:25:36] Finished 'prism' after 1.89 s
[19:25:36] Starting 'copy'...
[19:25:36] Starting 'require'...
[19:25:36] Starting 'htmlmin'...
[19:25:36] Starting 'cssmin'...
[19:25:37] Optimizing main.js
Error: ENOENT: no such file or directory, open '/home/taw/x/laverna-0.7.51/app/bower_components/device.js/lib/device.min.js'
In module tree:
    main
      init
        app

events.js:183
      throw er; // Unhandled 'error' event
      ^
Error: Error: ENOENT: no such file or directory, open '/home/taw/x/laverna-0.7.51/app/bower_components/device.js/lib/device.min.js'
In module tree:
    main
      init
        app

    at Object.fs.openSync (fs.js:646:18)

    at /home/taw/x/laverna-0.7.51/node_modules/requirejs/bin/r.js:28326:19
    at /home/taw/x/laverna-0.7.51/node_modules/requirejs/bin/r.js:3059:39
    at /home/taw/x/laverna-0.7.51/node_modules/requirejs/bin/r.js:2999:25
    at Function.prim.nextTick (/home/taw/x/laverna-0.7.51/node_modules/requirejs/bin/r.js:28077:9)
    at Object.errback (/home/taw/x/laverna-0.7.51/node_modules/requirejs/bin/r.js:2998:26)
    at Object.callback (/home/taw/x/laverna-0.7.51/node_modules/requirejs/bin/r.js:2984:23)
    at Object.then (/home/taw/x/laverna-0.7.51/node_modules/requirejs/bin/r.js:3038:23)
    at build (/home/taw/x/laverna-0.7.51/node_modules/requirejs/bin/r.js:28283:12)
    at runBuild (/home/taw/x/laverna-0.7.51/node_modules/requirejs/bin/r.js:30291:17)
    at Object.execCb (/home/taw/x/laverna-0.7.51/node_modules/requirejs/bin/r.js:1946:33)
daed commented 6 years ago

@taw00 Did you ever figure this out?

taw00 commented 6 years ago

I've gone through many hoops trying to build this. The code is very dated at this point. I am not optimistic that I can build straight from source without extraordinary effort. Sadly.

daed commented 6 years ago

I set up a vm with Fedora 28 over the weekend. Other than https://github.com/Laverna/laverna/issues/963, I was able to build the master branch just fine. I did do the global installs though.

taw00 commented 6 years ago

Now... try to do it without global installs.

daed commented 6 years ago

Seemed to work with no globals:

[test@localhost laverna]$ node --version
v8.11.3
[test@localhost laverna]$ npm list -g --depth 0
/usr/lib
└── npm@5.6.0

[test@localhost laverna]$ gulp
bash: gulp: command not found...
[test@localhost laverna]$ ./node_modules/gulp/bin/gulp.js build
[11:13:14] Using gulpfile ~/code/laverna/gulpfile.js
[11:13:14] Starting 'build'...
[11:13:14] Starting 'clean:dist'...
[11:13:14] Finished 'clean:dist' after 256 ms
[11:13:14] Starting 'prism'...
[11:13:14] Starting 'less'...
[11:13:15] Finished 'less' after 1.48 s
[11:13:15] Finished 'prism' after 1.56 s
[11:13:15] Starting 'copy'...
[11:13:16] Starting 'require'...
[11:13:16] Starting 'htmlmin'...
[11:13:16] Starting 'cssmin'...
[11:13:17] Optimizing main.js
[11:13:30] Finished 'require' after 15 s
[11:13:31] Finished 'cssmin' after 14 s
[11:13:32] Finished 'htmlmin' after 16 s
[11:13:38] Finished 'copy' after 22 s
[11:13:38] Starting 'htmlManifest'...
[11:13:38] Finished 'htmlManifest' after 627 ms
[11:13:38] Finished 'build' after 25 s
[test@localhost laverna]$ ./node_modules/gulp/bin/gulp.js
[11:13:47] Using gulpfile ~/code/laverna/gulpfile.js
[11:13:47] Starting 'default'...
[11:13:47] Starting 'less'...
[11:13:47] Starting 'prism'...
[11:13:48] Finished 'less' after 1.9 s
[11:13:48] Finished 'prism' after 1.37 s
[11:13:48] Starting 'serve:start'...
[11:13:48] Finished 'serve:start' after 15 ms
[11:13:49] Starting 'serve:watch'...
[11:13:50] Finished 'serve:watch' after 1.63 s
[11:13:50] Finished 'default' after 3.58 s
[Browsersync] Access URLs:
 -------------------------------------
       Local: http://localhost:9000
    External: http://192.168.1.20:9000
 -------------------------------------
          UI: http://localhost:3001
 UI External: http://192.168.1.20:3001
 -------------------------------------
[Browsersync] Serving files from: app

I wish I had some sort of suggestions at this point. Are you still on Fed 27, or did you upgrade to 28 yet? Did you use the yum version of nodejs and npm?

[test@localhost laverna]$ yum info nodejs
Last metadata expiration check: 0:01:10 ago on Tue 31 Jul 2018 11:22:57 AM CDT.
Installed Packages
Name         : nodejs
Epoch        : 1
Version      : 8.11.3
Release      : 1.fc28
Arch         : x86_64
Size         : 26 M
Source       : nodejs-8.11.3-1.fc28.src.rpm
Repo         : @System
From repo    : updates
Summary      : JavaScript runtime
URL          : http://nodejs.org/
License      : MIT and ASL 2.0 and ISC and BSD
Description  : Node.js is a platform built on Chrome's JavaScript runtime
             : for easily building fast, scalable network applications.
             : Node.js uses an event-driven, non-blocking I/O model that
             : makes it lightweight and efficient, perfect for data-intensive
             : real-time applications that run across distributed devices.
taw00 commented 6 years ago

F28. I always install literally everything via RPM and DNF though, for example device.min.js is not available via RPM. I haven't looked at this issue in some time though, so.. maybe when/if I get some free time in the next week I will play with it again. NodeJS is an abomination of packaging unfriendly dependencies.

taw00 commented 2 years ago

It's been 4 years and this is a dead project. Closing.