Pollen.jl
Pollen.jl copied to clipboard
Frontend server closing directly
When trying to serve the docs (from serve.jl
generated with PkgTemplates) I get the following:
[ Info: Starting initial build...
[ Info: Starting frontend dev server at http://localhost:3000
[ Info: Done.
[ Info: Starting server...
✓ LiveServer listening on http://localhost:8000/ ...
(use CTRL+C to shut down)
[ Info: Stopped frontend dev server
localhost:3000
returns nothing and 8000
shows this
The output of npm dev
is hidden by the command; this is probably throwing an error. You can try going to the Pollen.FRONTEND_DIR
directory and running npm dev
manually to see if an error is shown.
I just had the same error.
The output of
npm dev
is hidden by the command; this is probably throwing an error. You can try going to thePollen.FRONTEND_DIR
directory and runningnpm dev
manually to see if an error is shown.
When I follow these instructions, this is the result. I'm not sure what the next step is.
$ npm run dev
> [email protected] dev
> vite dev
file:///home/sethaxen/.julia/scratchspaces/c88717ad-5130-4874-a664-5a9aba5ec443/frontend/node_modules/vite/bin/vite.js:7
await import('source-map-support').then((r) => r.default.install())
^^^^^
SyntaxError: Unexpected reserved word
at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)
at async link (internal/modules/esm/module_job.js:42:21)
In case it's useful, I did get some error upon the first run of servedocs
:
julia> servedocs(ArviZJuliaDocs)
[ Info: Loading project configuration from /home/sethaxen/projects/ArviZJuliaDocs/docs
Activating project at `~/projects/ArviZJuliaDocs/docs`
┌ Info: Downloading stork executable for Ubuntu 20.04. If you're using a different
└ Linux distribution, it may fail.
[ Info: Starting development server...
[ Info: Starting initial build...
[ Info: Cloning Pollen.jl frontend code from https://github.com/lorenzoh/pollenjl-frontend...
Cloning into '/home/sethaxen/.julia/scratchspaces/c88717ad-5130-4874-a664-5a9aba5ec443/frontend'...
remote: Enumerating objects: 2339, done.
remote: Counting objects: 100% (432/432), done.
remote: Compressing objects: 100% (253/253), done.
remote: Total 2339 (delta 229), reused 353 (delta 168), pack-reused 1907
Receiving objects: 100% (2339/2339), 6.97 MiB | 14.87 MiB/s, done.
Resolving deltas: 100% (1627/1627), done.
Already on 'main'
Your branch is up to date with 'origin/main'.
[ Info: Installing Pollen.jl frontend dependencies...
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
[ Info: Done.......] - extract:esbuild-linux-riscv64: sill extract [email protected] extracted
[ Info: Starting server...
✓ LiveServer listening on http://localhost:8000/ ...d-numberformat: sill extract @formatjs/intl-unified-num
(use CTRL+C to shut down)[ ......] - extract:@formatjs/intl-unified-numberformat: sill extract [ ......] | extract:esbuild-darwin-64: sill extract [email protected] extracted to /home
npm WARN lifecycle The node binary used for scripts is /usr/bin/node but npm is using /home/sethaxen/.julia/artifacts/6460883d771aad2be8082172187a886c663a8a80/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
> [email protected] postinstall /home/sethaxen/.julia/scratchspaces/c88717ad-5130-4874-a664-5a9aba5ec443/frontend/node_modules/esbuild
> node install.js
> [email protected] postinstall /home/sethaxen/.julia/scratchspaces/c88717ad-5130-4874-a664-5a9aba5ec443/frontend/node_modules/svelte-preprocess
> echo "[svelte-preprocess] Don't forget to install the preprocessors packages that will be used: node-sass/sass, stylus, less, postcss & postcss-load-config, coffeescript, pug, etc..."
[svelte-preprocess] Don't forget to install the preprocessors packages that will be used: node-sass/sass, stylus, less, postcss & postcss-load-config, coffeescript, pug, etc...
> @sveltejs/[email protected] postinstall /home/sethaxen/.julia/scratchspaces/c88717ad-5130-4874-a664-5a9aba5ec443/frontend/node_modules/@sveltejs/kit
> node postinstall.js
file:///home/sethaxen/.julia/scratchspaces/c88717ad-5130-4874-a664-5a9aba5ec443/frontend/node_modules/@sveltejs/kit/postinstall.js:8
const cwd = process.env.INIT_CWD ?? process.cwd();
^
SyntaxError: Unexpected token '?'
at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)
at async link (internal/modules/esm/module_job.js:42:21)
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @esbuild/[email protected] (node_modules/@esbuild/android-arm):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @esbuild/[email protected]: wanted {"os":"android","arch":"arm"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @esbuild/[email protected] (node_modules/@esbuild/linux-loong64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @esbuild/[email protected]: wanted {"os":"linux","arch":"loong64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild-windows-arm64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"win32","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild-windows-64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"win32","arch":"x64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild-windows-32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"win32","arch":"ia32"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild-sunos-64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"sunos","arch":"x64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild-openbsd-64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"openbsd","arch":"x64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild-netbsd-64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"netbsd","arch":"x64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild-linux-s390x):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux","arch":"s390x"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild-linux-riscv64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux","arch":"riscv64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild-linux-ppc64le):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux","arch":"ppc64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild-linux-mips64le):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux","arch":"mips64el"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild-linux-arm64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild-linux-arm):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux","arch":"arm"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild-linux-32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux","arch":"ia32"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild-freebsd-arm64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"freebsd","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild-freebsd-64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"freebsd","arch":"x64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild-darwin-arm64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild-darwin-64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"x64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild-android-arm64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"android","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild-android-64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"android","arch":"x64"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @sveltejs/[email protected] postinstall: `node postinstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @sveltejs/[email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/sethaxen/.npm/_logs/2022-11-12T20_31_11_461Z-debug.log
^C[ Info: Shutting down server...
Activating project at `/tmp/jl_s3Vw4c`
julia> ^C
julia> servedocs(ArviZJuliaDocs)
[ Info: Loading project configuration from /home/sethaxen/projects/ArviZJuliaDocs/docs
Activating project at `~/projects/ArviZJuliaDocs/docs`
[ Info: Starting development server...
[ Info: Starting initial build...
[ Info: Starting frontend dev server at http://localhost:5173
[ Info: Done.
[ Info: Starting server...
✓ LiveServer listening on http://localhost:8000/ ...
(use CTRL+C to shut down)
[ Info: Stopped frontend dev server
^C[ Info: Shutting down server...
Activating project at `/tmp/jl_s3Vw4c`
julia> servedocs(ArviZJuliaDocs)
[ Info: Loading project configuration from /home/sethaxen/projects/ArviZJuliaDocs/docs
Activating project at `~/projects/ArviZJuliaDocs/docs`
[ Info: Starting development server...
[ Info: Starting initial build...
[ Info: Starting frontend dev server at http://localhost:5173
[ Info: Done.
[ Info: Starting server...
✓ LiveServer listening on http://localhost:8000/ ...
(use CTRL+C to shut down)
[ Info: Stopped frontend dev server
It's funny I was just trying running this again starting from scratch. Aaaand I still have the same issue...
This is my error though
shell> npm run dev
> [email protected] dev
> svelte-kit dev
file:///home/theo/.julia/scratchspaces/c88717ad-5130-4874-a664-5a9aba5ec443/frontend/node_modules/@sveltejs/kit/dist/cli.js:1073
} else if (allow?.length && cwd) {
^
SyntaxError: Unexpected token '.'
at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)
Seems related to node versions and untested interplay with OS. The best way to fix this on your system would be to run Pollen.servedocs
with the frontend = false
kwarg and then run the frontend manually.
To do that, clone it, running:
git clone https://github.com/lorenzoh/pollenjl-frontend
cd pollenjl-frontend
npm install
npm run dev
Am debugging with @theogf atm