Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building from source failure #948

Open
jgranduel opened this issue Apr 25, 2024 · 3 comments
Open

Building from source failure #948

jgranduel opened this issue Apr 25, 2024 · 3 comments
Labels
self-hosting Self-hosting setup that needs some love

Comments

@jgranduel
Copy link

Hi,

I discovered Grist after a presentation in Fosdem 2024. I have decided to give it a try as when, excited by some features (reference type for instance) to show colleags what could be done with linked tables. But it hasn't been that easy.

I am on Windows Pro. I tried to avoid docker for first test. And I hadn't yarn installed, and got into error, so I tried grist-electron which unfortunately came only with an installer so with unnecessary admin rights asked. Anyway I installed it. grist-electron doesn't seem on par with some online tutorial and wanted the latest version.

I have tried again to install with docker CLI which I don't know enough, and couldn't make dockerd service run for some reasons. Kind of a rabbit hole.

So back to Building from source.

First of all, please mention upfront that for now node-18 is required because of minio-7 (too bad to discover at the end of process that my version if ahead of the one required)`.

PS7 C:\git\grist-core> yarn install
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "i18next-scanner > acorn-dynamic-import@4.0.0" has incorrect peer dependency "acorn@^6.0.0".
[4/4] Building fresh packages...
Done in 18.89s.
#141 PS7 C:\git\grist-core> yarn run build:prod
yarn run v1.22.19
$ buildtools/build.sh
Done in 105.94s.
#142 PS7 C:\git\grist-core> yarn run install:python
yarn run v1.22.19
$ buildtools/prepare_python.sh
Done in 10.10s.
#143 PS7 C:\git\grist-core> yarn start
yarn run v1.22.19
$ sandbox/watch.sh

On bash console entitled : `/usr/bin/bash --login -i C:\git\girst-core\sandbox\watch.sh

+ PROJECT=
+ [[ -e ext/app ]]
+ WEBPACK_CONFIG=buildtools/webpack.config.js
+ [[ -e ext/buildtools/webpack.config.js ]]
+ '[' '!' -e _build ']'
+ tsc --build -w --preserveWatchOutput
+ catw app/client/app.css app/client/logo.css app/client/components/AceEditor.css app/client/components/ActionLog.css app/client/components/ChartView.css app/client/components/Clipboard.css app/client/components/CodeEditorPanel.css app/client/components/ColumnFilters.css app/client/components/CustomView.css app/client/components/DetailView.css app/client/components/EmbedForm.css app/client/components/FieldConfigTab.css app/client/components/GridView.css app/client/components/GristDoc.css app/client/components/Layout.css app/client/components/LayoutEditor.css app/client/components/Login.css app/client/components/Printing.css app/client/components/RecordLayout.css app/client/components/SearchBar.css app/client/components/ValidationPanel.css app/client/components/ViewConfigTab.css app/client/components/ViewLayout.css app/client/components/ViewLinker.css app/client/components/commands.css app/client/components/viewCommon.css app/client/lib/SafeBrowserProcess.css app/client/lib/koDomScrolly.css app/client/lib/koForm.css app/client/lib/multiselect.css app/client/ui/App.css app/client/ui/DocTutorial.css app/client/widgets/CheckBox.css app/client/widgets/DateTimeEditor.css app/client/widgets/FieldBuilder.css app/client/widgets/Reference.css app/client/widgets/Spinner.css app/client/widgets/Switch.css app/client/widgets/TextBox.css app/client/widgets/TextEditor.css -o static/bundle.css -v
+ webpack --config buildtools/webpack.config.js --mode development --watch
+ wait
+ NODE_PATH=_build:_build/stubs:_build/ext
+ nodemon --delay 1 -w _build/app/server -w _build/app/common _build/stubs/app/server/server.js

10:24:02 - Starting compilation in watch mode...


10:24:02 - Found 0 errors. Watching for file changes.
97800 bytes written to static/bundle.css
[nodemon] 2.0.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): _build\app\server\**\* _build\app\common\**\*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node _build/stubs/app/server/server.js`
node:internal/modules/cjs/loader:998
  throw err;
  ^

Error: Cannot find module 'app/common/gristUrls'
Require stack:
- C:\git\grist-core\_build\stubs\app\server\server.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (C:\git\grist-core\_build\stubs\app\server\server.js:32:21)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ 'C:\\git\\grist-core\\_build\\stubs\\app\\server\\server.js' ]
}

Node.js v18.12.1
[nodemon] app crashed - waiting for file changes before starting...
assets by chunk 5.51 MiB (id hint: vendors)
  asset vendors-node_modules_plotly_js-basic-dist_plotly-basic_js.bundle.js 2.75 MiB [emitted] (id hint: vendors) 1 related asset
  asset vendors-node_modules_gristlabs_moment-guess_dist_bundle_js-node_modules_ace-builds_src-noconf-e7ab4a.bundle.js 2.25 MiB [emitted] (id hint: vendors) 1 related asset
  asset vendors-node_modules_moment-timezone_index_js.bundle.js 200 KiB [emitted] (id hint: vendors) 1 related asset
  asset vendors-node_modules_moment_moment_js.bundle.js 171 KiB [emitted] (id hint: vendors) 1 related asset
  asset vendors-node_modules_color-convert_index_js-node_modules_highlight_js_lib_core_js-node_module-b212e3.bundle.js 137 KiB [emitted] (id hint: vendors) 1 related asset
  asset vendors-node_modules_lodash_deburr_js-node_modules_lodash_escapeRegExp_js-node_modules_lodash-7f2df1.bundle.js 20.9 KiB [emitted] (id hint: vendors) 1 related asset
+ 18 assets
runtime modules 23 KiB 56 modules
modules by path ./node_modules/ 8.25 MiB
  javascript modules 7.93 MiB 718 modules
  json modules 327 KiB 3 modules
modules by path ./app/ 2.69 MiB 485 modules
modules by path ./test/ 168 KiB 28 modules
modules by path ./stubs/app/ 1.04 KiB
  modules by path ./stubs/app/client/ui/*.ts 778 bytes 6 modules
  ./stubs/app/common/version.ts 156 bytes [built] [code generated]
  ./stubs/app/client/components/Banners.ts 129 bytes [built] [code generated]
external "jQuery" 42 bytes [built] [code generated]
external "alert" 42 bytes [built] [code generated]
./package.json 6.87 KiB [built] [code generated]

WARNING in ./stubs/app/common/version.ts 2:23-42
Should not import the named export 'version' (imported as 'packageJson') from default-exporting module (only default export is available soon)
 @ ./app/client/ui/AppHeader.ts 5:0-46 40:170-185 40:191-208 40:230-247
 @ ./app/client/ui/errorPages.ts 3:0-52 77:25-34
 @ ./app/client/errorMain.ts 2:0-57 3:28-41

webpack 5.73.0 compiled with 1 warning in 6384 ms

But at this time, what shouldn't the web server be running? In browser, http://localhost:8484/ displays connection failure.
Too difficult to solve at my knowledge level!

When I close the bash console window, I still have esbuild and 4 sh.exe process tree running.

What could be wrong in my environment?

Thanks in advance for any tip!

@jordigh jordigh added the self-hosting Self-hosting setup that needs some love label Apr 29, 2024
@fflorent
Copy link
Collaborator

Hi @jgranduel !

I made the presentation in FOSDEM, glad it arouse your interest!

I am a bit in a hurry, but I would like to answer you about one of your points:

 First of all, please mention upfront that for now node-18 is required because of minio-7 (too bad to discover at the end of process that my version if ahead of the one required)`.

This is not the case anymore since yesterday on the main branch, you should be able to build Grist using node 20 after #921 has been merged.

Thanks for your feedback!

@jgranduel
Copy link
Author

Bonjour !
Thanks and you're welcome. Don't worry and don't hurry, I have time for testing grist in the coming future ! I will give a try with node-20.

@jgranduel
Copy link
Author

Hi,

same issue as before with node-20.6 :

+ PROJECT=
+ [[ -e ext/app ]]
+ WEBPACK_CONFIG=buildtools/webpack.config.js
+ [[ -e ext/buildtools/webpack.config.js ]]
+ '[' '!' -e _build ']'
+ tsc --build -w --preserveWatchOutput
+ css_files='app/client/**/*.css'
+ chokidar 'app/client/**/*.css' -c 'bash -O globstar -c '\''cat app/client/**/*.css > static/bundle.css'\'''
+ webpack --config buildtools/webpack.config.js --mode development --watch
+ wait
+ NODE_PATH=_build:_build/stubs:_build/ext
+ nodemon --delay 1 -w _build/app/server -w _build/app/common _build/stubs/app/server/server.js

16:54:48 - Starting compilation in watch mode...

[nodemon] 2.0.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): _build\app\server\**\* _build\app\common\**\*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node _build/stubs/app/server/server.js`
node:internal/modules/cjs/loader:1051
  throw err;
  ^

Error: Cannot find module 'app/common/gristUrls'
Require stack:
- C:\git\grist-core\_build\stubs\app\server\server.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
    at Module._load (node:internal/modules/cjs/loader:901:27)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (C:\git\grist-core\_build\stubs\app\server\server.js:32:21)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ 'C:\\git\\grist-core\\_build\\stubs\\app\\server\\server.js' ]
}

Node.js v20.6.0
Watching "app/client/**/*.css" ..
[nodemon] app crashed - waiting for file changes before starting...
[nodemon] restarting due to changes...
[nodemon] starting `node _build/stubs/app/server/server.js`
node:internal/modules/cjs/loader:1051
  throw err;
  ^

Error: Cannot find module 'app/common/gristUrls'
Require stack:
- C:\git\grist-core\_build\stubs\app\server\server.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
    at Module._load (node:internal/modules/cjs/loader:901:27)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (C:\git\grist-core\_build\stubs\app\server\server.js:32:21)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ 'C:\\git\\grist-core\\_build\\stubs\\app\\server\\server.js' ]
}

Node.js v20.6.0
[nodemon] app crashed - waiting for file changes before starting...

16:54:55 - Found 0 errors. Watching for file changes.
[nodemon] restarting due to changes...
[nodemon] starting `node _build/stubs/app/server/server.js`
node:internal/modules/cjs/loader:1051
  throw err;
  ^

Error: Cannot find module 'app/common/gristUrls'
Require stack:
- C:\git\grist-core\_build\stubs\app\server\server.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
    at Module._load (node:internal/modules/cjs/loader:901:27)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (C:\git\grist-core\_build\stubs\app\server\server.js:32:21)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ 'C:\\git\\grist-core\\_build\\stubs\\app\\server\\server.js' ]
}

Node.js v20.6.0
[nodemon] app crashed - waiting for file changes before starting...
assets by chunk 5.01 MiB (id hint: vendors)
  asset vendors-node_modules_plotly_js-basic-dist_plotly-basic_js.bundle.js 2.75 MiB [emitted] (id hint: vendors) 1 related asset
  asset vendors-node_modules_gristlabs_moment-guess_dist_bundle_js-node_modules_ace-builds_src-noconf-6efca3.bundle.js 926 KiB [emitted] (id hint: vendors) 1 related asset
  asset vendors-node_modules_ace-builds_src-noconflict_ace_js.bundle.js 826 KiB [emitted] (id hint: vendors) 1 related asset
  asset vendors-node_modules_moment-timezone_index_js.bundle.js 200 KiB [emitted] (id hint: vendors) 1 related asset
  asset vendors-node_modules_moment_moment_js.bundle.js 171 KiB [emitted] (id hint: vendors) 1 related asset
  asset vendors-node_modules_color-convert_index_js-node_modules_highlight_js_lib_core_js-node_module-b212e3.bundle.js 137 KiB [emitted] (id hint: vendors) 1 related asset
  asset vendors-node_modules_lodash_deburr_js-node_modules_lodash_escapeRegExp_js-node_modules_lodash-7f2df1.bundle.js 20.9 KiB [emitted] (id hint: vendors) 1 related asset
  asset vendors-node_modules_locale-currency_index_js-node_modules_lodash_sortBy_js.bundle.js 16.9 KiB [emitted] (id hint: vendors) 1 related asset
  asset vendors-node_modules_ace-builds_src-noconflict_mode-python_js.bundle.js 16.7 KiB [emitted] (id hint: vendors) 1 related asset
+ 24 assets
runtime modules 51.9 KiB 84 modules
orphan modules 681 bytes [orphan] 1 module
modules by path ./node_modules/ 7.77 MiB
  javascript modules 7.46 MiB 741 modules
  json modules 325 KiB 2 modules
modules by path ./app/ 2.73 MiB 492 modules
modules by path ./test/ 168 KiB 28 modules
modules by path ./stubs/app/ 1.04 KiB
  modules by path ./stubs/app/client/ui/*.ts 778 bytes 6 modules
  ./stubs/app/common/version.ts 156 bytes [built] [code generated]
  ./stubs/app/client/components/Banners.ts 129 bytes [built] [code generated]
external "jQuery" 42 bytes [built] [code generated]
external "alert" 42 bytes [built] [code generated]
./package.json 6.9 KiB [built] [code generated]

WARNING in ./stubs/app/common/version.ts 2:23-42
Should not import the named export 'version' (imported as 'packageJson') from default-exporting module (only default export is available soon)
 @ ./app/client/ui/AppHeader.ts 5:0-46 40:170-185 40:191-208 40:230-247
 @ ./app/client/ui/errorPages.ts 3:0-52 77:25-34
 @ ./app/client/errorMain.ts 2:0-57 3:28-41

webpack 5.91.0 compiled with 1 warning in 8876 ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
self-hosting Self-hosting setup that needs some love
Projects
Development

No branches or pull requests

3 participants