Error while upgrading to 0.7.0



  • After running ./node upgrade I get the error message

    nodebb-widget-essentials@1.0.2 node_modules/nodebb-widget-essentials
    
    nodebb-theme-lavender@1.0.42 node_modules/nodebb-theme-lavender
    
    nodebb-theme-vanilla@1.0.130 node_modules/nodebb-theme-vanilla
    27/5 16:54 [86470] - info: NodeBB v0.7.0 Copyright (C) 2013-2014 NodeBB Inc.
    27/5 16:54 [86470] - info: This program comes with ABSOLUTELY NO WARRANTY.
    27/5 16:54 [86470] - info: This is free software, and you are welcome to redistribute it under certain conditions.
    27/5 16:54 [86470] - info:
    
    module.js:340
        throw err;
        ^
    Error: Cannot find module './build/Release/magic'
        at Function.Module._resolveFilename (module.js:338:15)
        at Function.Module._load (module.js:280:25)
        at Module.require (module.js:364:17)
        at require (module.js:380:17)
        at Object.<anonymous> (/root/nodebb/node_modules/mmmagic/index.js:3:13)
        at Module._compile (module.js:456:26)
        at Object.Module._extensions..js (module.js:474:10)
        at Module.load (module.js:356:32)
        at Function.Module._load (module.js:312:12)
        at Module.require (module.js:364:17)
        at require (module.js:380:17)
        at Object.<anonymous> (/root/nodebb/src/file.js:7:12)
    

    Any idea how to fix this?


  • Plugin & Theme Dev

    @Mandosis what's your node js version?



  • @pichalite v0.10.32


  • Plugin & Theme Dev

    @Mandosis Try npm install mmmagic



  • @pichalite I get this error

    \
    > mmmagic@0.3.14 install /root/nodebb/node_modules/mmmagic
    > node-gyp rebuild
    
    make: Entering directory '/root/nodebb/node_modules/mmmagic/build'
      CC(target) Release/obj.target/libmagic/deps/libmagic/src/apprentice.o
      CC(target) Release/obj.target/libmagic/deps/libmagic/src/apptype.o
      CC(target) Release/obj.target/libmagic/deps/libmagic/src/ascmagic.o
      CC(target) Release/obj.target/libmagic/deps/libmagic/src/cdf.o
    ../deps/libmagic/src/cdf.c: In function 'cdf_read':
    ../deps/libmagic/src/cdf.c:303:2: warning: implicit declaration of function 'pread' [-Wimplicit-function-declaration]
      CC(target) Release/obj.target/libmagic/deps/libmagic/src/cdf_time.o
      CC(target) Release/obj.target/libmagic/deps/libmagic/src/compress.o
    ../deps/libmagic/src/compress.c: In function 'file_zmagic':
    ../deps/libmagic/src/compress.c:108:2: error: unknown type name 'sig_t'
    ../deps/libmagic/src/compress.c:113:11: warning: assignment makes integer from pointer without a cast [enabled by default]
    ../deps/libmagic/src/compress.c:140:2: warning: passing argument 2 of 'signal' makes pointer from integer without a cast [enabled by default]
    In file included from /usr/include/signal.h:42:0,
                     from ../deps/libmagic/src/compress.c:48:
    /usr/include/iso/signal_iso.h:63:15: note: expected 'void (*)(int)' but argument is of type 'int'
    deps/libmagic/libmagic.target.mk:117: recipe for target 'Release/obj.target/libmagic/deps/libmagic/src/compress.o' failed
    make: *** [Release/obj.target/libmagic/deps/libmagic/src/compress.o] Error 1
    make: Leaving directory '/root/nodebb/node_modules/mmmagic/build'
    gyp ERR! build error
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack     at ChildProcess.onExit (/opt/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
    gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
    gyp ERR! System SunOS 5.11
    gyp ERR! command "node" "/opt/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /root/nodebb/node_modules/mmmagic
    gyp ERR! node -v v0.10.32
    gyp ERR! node-gyp -v v1.0.1
    gyp ERR! not ok
    
    npm ERR! mmmagic@0.3.14 install: `node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the mmmagic@0.3.14 install script.
    npm ERR! This is most likely a problem with the mmmagic package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR!     node-gyp rebuild
    npm ERR! You can get their info via:
    npm ERR!     npm owner ls mmmagic
    npm ERR! There is likely additional logging output above.
    npm ERR! System SunOS 5.11
    npm ERR! command "/opt/local/bin/node" "/opt/local/bin/npm" "install" "mmmagic"
    npm ERR! cwd /root/nodebb
    npm ERR! node -v v0.10.32
    npm ERR! npm -v 1.4.28
    npm ERR! code ELIFECYCLE
    npm ERR! not ok code 0
    


  • npm install -g n
    n 0.10.33
    git fetch
    git checkout v0.7.x
    git merge origin/v0.7.x
    ./nodebb upgrade



  • @lombisi I tried your solution and it did not seem to work. I have been talking to @pichalite and mmmagic does not want to install. The install script fails to run.


  • Admin

    @Mandosis Perhaps mmmagic cannot compile on SunOS. Can you try a different distribution?



  • @julian Unfortunately on that server I do not have a choice of the distribution.


  • Admin

    mscdex/mmmagic#52

    Subscribe here 😄

    julianlam created this issue in mscdex/mmmagic

    closed Build fails on SunOS 5.11 #52



  • @julian Awesome, thanks! I will keep an eye on that.


 

| |

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.