Commit Graph

67 Commits

Author SHA1 Message Date
7e20b9eaa2 Force usage of npm v6 (#264)
Upgrading npm to v7 cause `npm install` error in `server` repo
on Spellchecker compilation
We didn't found exact reason why this happens and
if this a bug in npm or just some major changes in npm from v6
to v7

This error can be repoduced with this simple Dockerfile
```
FROM node:10

RUN npm install -g npm
RUN npm -v
RUN git clone --depth 1 https://github.com/ONLYOFFICE/server.git
RUN cd server/SpellChecker && \
    npm install
```
In this Dockerfile - npm v7.5.4 installed and causing:
```
Step 5/5 : RUN cd server/SpellChecker &&     npm install
 ---> Running in 158d202d2c11
npm notice
npm notice New patch version of npm available! 7.5.4 -> 7.5.6
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.5.6>
npm notice Run `npm install -g npm@7.5.6` to update!
npm notice
npm ERR! code 1
npm ERR! path /server/SpellChecker/node_modules/nodehun
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory '/server/SpellChecker/node_modules/nodehun/build'
npm ERR! make: Leaving directory '/server/SpellChecker/node_modules/nodehun/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@10.23.3 | linux | x64
npm ERR! gyp info find Python using Python version 3.5.3 found at "/usr/bin/python3"
npm ERR! gyp http GET https://nodejs.org/download/release/v10.23.3/node-v10.23.3-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v10.23.3/node-v10.23.3-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v10.23.3/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v10.23.3/SHASUMS256.txt
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/server/SpellChecker/node_modules/nodehun/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/root/.cache/node-gyp/10.23.3/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/root/.cache/node-gyp/10.23.3',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/10.23.3/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/server/SpellChecker/node_modules/nodehun',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.' ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! make: *** No rule to make target 'Release/obj.target/hunspell/src/hunspell/src/hunspell/affentry.o', needed by 'Release/obj.target/src/hunspell.a'.  Stop.
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
npm ERR! gyp ERR! System Linux 5.4.0-65-generic
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /server/SpellChecker/node_modules/nodehun
npm ERR! gyp ERR! node -v v10.23.3
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-02-23T13_33_15_384Z-debug.log
```

But if we force npm v6:
```
FROM node:10

RUN npm install -g npm@6
RUN npm -v
RUN git clone --depth 1 https://github.com/ONLYOFFICE/server.git
RUN cd server/SpellChecker && \
    npm install
```

Forcing install of npm v6.14.11 and server Spellchecker
compilation is fine
2021-02-23 20:43:11 +03:00
1a2d610039 Fix example build for updated modules (#224)
* Fix example build for updated modules

* Small changes

* Small changes

* Small changes
2020-12-03 12:13:15 +03:00
47fb1a4a74 [build] Use run_command 2020-10-08 09:47:22 +03:00
4e64d49c88 Fix builds on ubuntu 20 2020-08-10 14:29:57 +03:00
39172d3bc4 Add support build from tag & add branch param to automate.py 2020-04-21 14:15:20 +03:00
06da438d2e Fix dependency installation (#73) 2020-04-10 09:36:14 +03:00
fa20d4b510 Fix spellchecker startup (#66) 2020-04-08 18:45:00 +03:00
e9f7e50864 Add deps 2020-03-25 17:20:21 +03:00
fc3a6eacc8 Fix build 2020-03-25 11:46:05 +03:00
af94e2e5b8 Fix for python3 2020-03-25 09:42:47 +03:00
0a939cff9f Refactoring 2020-03-24 17:49:47 +03:00
57947e89a2 Refactoring 2020-03-24 17:29:11 +03:00
a6a0924580 Refactoring 2020-03-23 18:11:20 +03:00
0a6f120e71 Add deps 2020-03-23 18:08:37 +03:00
324ee23f65 Automate build on linux platform 2020-03-23 17:33:50 +03:00
35f6544c6a Change executable rights 2020-03-23 15:31:40 +03:00
61fb99d548 Add automate build script 2020-03-23 15:23:44 +03:00