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

Unable to build neoConverse app #12728

Open
1 of 2 tasks
jocon-grmtx opened this issue Mar 21, 2025 · 4 comments
Open
1 of 2 tasks

Unable to build neoConverse app #12728

jocon-grmtx opened this issue Mar 21, 2025 · 4 comments

Comments

@jocon-grmtx
Copy link

Windows Version

Microsoft Windows [Version 10.0.19045.5608]

WSL Version

2.4.11.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.167.4-1

Distro Version

Ubuntu 20.04

Other Software

I am trying to follow the instructions to deploy neoConverse (https://github.com/neo4j-labs/neoconverse)
locally on my wsl2 ubuntu, but get the issue below after multiple tries. I've tried many things - updated wsl, ubuntu, tried the dev branch, upgraded node.js. No matter what, always this issue. Can anyone please assist - give me some hints? I've even tried deploying on a separate wsl 2 machine. Same. Thanks, John

Repro Steps

`neoconverse[deploy-branch !]$ sudo npm run build

@1.0.0 build /home/jac/projects/neoconverse
next build

/home/jac/projects/neoconverse/node_modules/next/dist/lib/picocolors.js:134
const { env, stdout } = ((_globalThis = globalThis) == null ? void 0 : _globalThis.process) ?? {};
^

SyntaxError: Unexpected token ?
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at Module.mod.require (/home/jac/projects/neoconverse/node_modules/next/dist/server/require-hook.js:64:28)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/home/jac/projects/neoconverse/node_modules/next/dist/build/output/log.js:55:21)
at Module._compile (internal/modules/cjs/loader.js:778:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @1.0.0 build: next build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @1.0.0 build 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! /root/.npm/_logs/2025-03-19T18_31_14_315Z-debug.log
neoconverse[deploy-branch !]$ node -v
v22.14.0
neoconverse[deploy-branch !]$ npm -v
11.2.0`

Expected Behavior

Ability to execute the app

Actual Behavior

Fails during build

Diagnostic Logs

No response

Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

@jocon-grmtx
Copy link
Author

This works fine on a VM running Ubuntu. This is why I suspect it is a WSL issue.

@elsaco
Copy link

elsaco commented Mar 22, 2025

@jocon-grmtx on Ubuntu-24.04.2 the app builds w/out errors.

Build output:

elsaco@texas:~/neoconverse$ sudo npm run build

> build
> next build

Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry

   Skipping validation of types
   Skipping linting
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
   Creating an optimized production build  ..<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (115kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
Browserslist: caniuse-lite is outdated. Please run:
  npx browserslist@latest --update-db
  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
 ⚠ Compiled with warnings

./node_modules/@aws-sdk/core/dist-es/client/emitWarningIfUnsupportedVersion.js
A Node.js API is used (process.emitWarning at line: 5) which is not supported in the Edge Runtime.
Learn more: https://nextjs.org/docs/api-reference/edge-runtime

Import trace for requested module:
./node_modules/@aws-sdk/core/dist-es/client/emitWarningIfUnsupportedVersion.js
./node_modules/@aws-sdk/core/dist-es/client/index.js
./node_modules/@aws-sdk/core/dist-es/index.js
./node_modules/@aws-sdk/client-bedrock-runtime/dist-es/auth/httpAuthSchemeProvider.js
./node_modules/@aws-sdk/client-bedrock-runtime/dist-es/BedrockRuntimeClient.js
./node_modules/@aws-sdk/client-bedrock-runtime/dist-es/index.js
./components/llm/llmCommunication.ts

./node_modules/openai/core.mjs
A Node.js API is used (process.version at line: 561) which is not supported in the Edge Runtime.
Learn more: https://nextjs.org/docs/api-reference/edge-runtime

Import trace for requested module:
./node_modules/openai/core.mjs
./node_modules/openai/index.mjs
./components/llm/llmCommunication.ts

./node_modules/openai/core.mjs
A Node.js API is used (process.platform at line: 569) which is not supported in the Edge Runtime.
Learn more: https://nextjs.org/docs/api-reference/edge-runtime

Import trace for requested module:
./node_modules/openai/core.mjs
./node_modules/openai/index.mjs
./components/llm/llmCommunication.ts

./node_modules/openai/core.mjs
A Node.js API is used (process.arch at line: 570) which is not supported in the Edge Runtime.
Learn more: https://nextjs.org/docs/api-reference/edge-runtime

Import trace for requested module:
./node_modules/openai/core.mjs
./node_modules/openai/index.mjs
./components/llm/llmCommunication.ts

./node_modules/openai/core.mjs
A Node.js API is used (process.version at line: 572) which is not supported in the Edge Runtime.
Learn more: https://nextjs.org/docs/api-reference/edge-runtime

Import trace for requested module:
./node_modules/openai/core.mjs
./node_modules/openai/index.mjs
./components/llm/llmCommunication.ts

   Collecting page data  .securePage getAuthMethod: undefined
securePage Auth0 off, returning unwrapped component
 ✓ Collecting page data
   Generating static pages (0/5)  [=   ]securePage getAuthMethod: undefined
securePage Auth0 off, returning unwrapped component
getAuthMethod: undefined
Auth0 off, returning unwrapped component
getAuthMethod: undefined
Auth0 off, returning unwrapped component
getAuthMethod: undefined
Auth0 off, returning unwrapped component
   Generating static pages (3/5)  [ ===]
getAuthMethod: undefined
   Generating static pages (4/5)  [   =]
getAuthMethod: undefined
 ✓ Generating static pages (5/5)
 ✓ Collecting build traces
 ✓ Finalizing page optimization

   Creating an optimized production build  .Route (pages)                              Size     First Load JS
┌ ○ /                                      23.8 kB         884 kB
├   /_app                                  0 B            86.4 kB
├ ○ /404                                   183 B          86.6 kB
├ λ /api/auth/[auth0]                      0 B            86.4 kB
├ λ /api/authHelper                        0 B            86.4 kB
├ λ /api/call_api                          0 B            86.4 kB
├ ℇ /api/generate                          0 B            86.4 kB
├ ℇ /api/llm                               0 B            86.4 kB
├ ℇ /api/neoapi                            0 B            86.4 kB
├ ○ /applicationContent (1463 ms)          200 B           861 kB
└ ○ /setup (1068 ms)                       171 kB          341 kB
+ First Load JS shared by all              86.7 kB
  ├ chunks/framework-467b11a89995b152.js   45.3 kB
  ├ chunks/main-75bdb96a41ba80f4.js        33 kB
  ├ chunks/pages/_app-d265a2dbcfc8f241.js  7.05 kB
  ├ chunks/webpack-6af0e3c12b874bb0.js     1.02 kB
  └ css/6d38eb161f578beb.css               298 B

ℇ  (Streaming)  server-side renders with streaming (uses React 18 SSR streaming or Server Components)
λ  (Server)     server-side renders at runtime (uses getInitialProps or getServerSideProps)
○  (Static)     automatically rendered as static HTML (uses no initial props)

WSL info:

WSL version: 2.5.1.0
Kernel version: 6.6.75.1-1
WSLg version: 1.0.66
MSRDC version: 1.2.5716
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.19045.5608

@zcobol
Copy link

zcobol commented Mar 23, 2025

@jocon-grmtx if the error is triggered by /home/jac/projects/neoconverse/node_modules/next/dist/lib/picocolors.js:134 why do you suspect is WSL's fault? picocolors is a node package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants