;=; SyntaxError

/srv/panel ❯ sudo apt-get install -y ca-certificates curl gnupg sudo mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list apt-get update apt-get install -y nodejs Reading package lists... Done Building dependency tree... Done Reading state information... Done ca-certificates is already the newest version (20240203). curl is already the newest version (8.9.1-2ubuntu2.2). gnupg is already the newest version (2.4.4-2ubuntu18). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. File '/etc/apt/keyrings/nodesource.gpg' exists. Overwrite? (y/N) y deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main Get:1 https://deb.nodesource.com/node_20.x nodistro InRelease [12.1 kB] Get:2 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages [10.4 kB]
Hit:3 http://security.ubuntu.com/ubuntu oracular-security InRelease
Hit:4 http://archive.ubuntu.com/ubuntu oracular InRelease
Hit:5 http://archive.ubuntu.com/ubuntu oracular-updates InRelease Hit:6 http://archive.ubuntu.com/ubuntu oracular-backports InRelease Fetched 22.5 kB in 1s (22.7 kB/s) Reading package lists... Done Reading package lists... Done Building dependency tree... Done Reading state information... Done The following NEW packages will be installed: nodejs 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 31.8 MB of archives. After this operation, 197 MB of additional disk space will be used. Get:1 https://deb.nodesource.com/node_20.x nodistro/main amd64 nodejs amd64 20.18.2-1nodesource1 [31.8 MB] Fetched 31.8 MB in 1s (21.9 MB/s) Selecting previously unselected package nodejs. (Reading database ... 127586 files and directories currently installed.) Preparing to unpack .../nodejs_20.18.2-1nodesource1_amd64.deb ... Unpacking nodejs (20.18.2-1nodesource1) ... Setting up nodejs (20.18.2-1nodesource1) ... Processing triggers for man-db (2.12.1-3) ... Scanning processes...
Scanning linux images...
Running kernel seems to be up-to-date. No services need to be restarted. No containers need to be restarted. No user sessions are running outdated binaries. No VM guests are running outdated hypervisor (qemu) binaries on this host. /srv/panel ❯ npm i -g yarn changed 1 package in 1s /srv/panel ❯ yarn yarn install v1.22.22 error SyntaxError: /package.json: Unexpected end of JSON input at JSON.parse (<anonymous>) at /usr/lib/node_modules/yarn/lib/cli.js:1629:59 at Generator.next (<anonymous>) at step (/usr/lib/node_modules/yarn/lib/cli.js:310:30) at /usr/lib/node_modules/yarn/lib/cli.js:321:13 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. /srv/panel ❯
2 Replies
Emma
Emma7mo ago
Could you provide additional context
bairon
baironOP7mo ago
When i execute yarn to initialize the dependences it shows the following error /srv/panel ❯ ls
BUILDING.md LICENSE.md app bootstrap config jest.config.js postcss.config.js routes tsconfig.json yarn.lock
CHANGELOG.md README.md artisan composer.json database package.json public storage vendor
Dockerfile SECURITY.md babel.config.js composer.lock docker-compose.example.yml panel.tar.gz resources tailwind.config.js webpack.config.js
BUILDING.md LICENSE.md app bootstrap config jest.config.js postcss.config.js routes tsconfig.json yarn.lock
CHANGELOG.md README.md artisan composer.json database package.json public storage vendor
Dockerfile SECURITY.md babel.config.js composer.lock docker-compose.example.yml panel.tar.gz resources tailwind.config.js webpack.config.js
/srv/panel ❯ yarn
yarn install v1.22.22
error SyntaxError: /package.json: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at /usr/lib/node_modules/yarn/lib/cli.js:1629:59
at Generator.next (<anonymous>)
at step (/usr/lib/node_modules/yarn/lib/cli.js:310:30)
at /usr/lib/node_modules/yarn/lib/cli.js:321:13
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
yarn install v1.22.22
error SyntaxError: /package.json: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at /usr/lib/node_modules/yarn/lib/cli.js:1629:59
at Generator.next (<anonymous>)
at step (/usr/lib/node_modules/yarn/lib/cli.js:310:30)
at /usr/lib/node_modules/yarn/lib/cli.js:321:13
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Did you find this page helpful?