Coder Social home page Coder Social logo

unable to run npm run dev about embedai HOT 10 CLOSED

samuraigpt avatar samuraigpt commented on September 23, 2024
unable to run npm run dev

from embedai.

Comments (10)

RattyDAVE avatar RattyDAVE commented on September 23, 2024 1

npm is the wrong version.

npm -v will give you the version number.

Here is my build script.

apt update -y
apt install -y curl
curl -sL https://deb.nodesource.com/setup_18.x | bash -

apt install -y git nodejs python3 curl build-essential
curl https://bootstrap.pypa.io/get-pip.py | python3

cd /root
git clone https://github.com/SamurAIGPT/privateGPT.git
cd privateGPT/client

npm install

cd /root
cd privateGPT/server
pip3 install -r requirements.txt

from embedai.

Anil-matcha avatar Anil-matcha commented on September 23, 2024

Please check if you have installed node and npm

from embedai.

Crushdada avatar Crushdada commented on September 23, 2024

can not run the client, SyntaxError: Unexpected token '??='
at cjs/loader.js

from embedai.

Anil-matcha avatar Anil-matcha commented on September 23, 2024

@RattyDAVE Thanks for sharing

@cyonghui81 @Crushdada Please update your npm version

from embedai.

RattyDAVE avatar RattyDAVE commented on September 23, 2024

No problem. I had the same battle myself.

from embedai.

YoeJates avatar YoeJates commented on September 23, 2024

I am getting a similar issue, but my npm is fully up to date and I tried following the build script above.

[email protected] dev
next dev

/root/privateGPT/client/node_modules/next/dist/cli/next-dev.js:256
showAll: args["--show-all"] ?? false,
^

SyntaxError: Unexpected token '?'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.dev (/root/privateGPT/client/node_modules/next/dist/lib/commands.js:15:30)
at Object. (/root/privateGPT/client/node_modules/next/dist/bin/next:150:28)
at Module._compile (internal/modules/cjs/loader.js:999:30)

from embedai.

RattyDAVE avatar RattyDAVE commented on September 23, 2024

I had that too.

curl -sL https://deb.nodesource.com/setup_18.x | bash -

Solved it.

from embedai.

RattyDAVE avatar RattyDAVE commented on September 23, 2024

Here are my versions that work.

root@79fe99adb8e1:/# pip -V
pip 23.1.2 from /usr/local/lib/python3.10/dist-packages/pip (python 3.10)
root@79fe99adb8e1:/# npm -v
9.5.1

from embedai.

Anil-matcha avatar Anil-matcha commented on September 23, 2024

@YoeJates Looks like a common issue https://stackoverflow.com/questions/74707066/nextjs-unexpected-token

You need to update nvm

from embedai.

Anil-matcha avatar Anil-matcha commented on September 23, 2024

Closing due to inactivity

from embedai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.