opensanctions / site

This repository is no longer maintained. The web site now contains billing mechanisms etc. which makes it hard to maintain as an open source project.
https://www.opensanctions.org
6 stars 2 forks source link

Error at startup #283

Closed abduli123 closed 1 year ago

abduli123 commented 1 year ago

Hi I'm trying to run the script on localhost using npm run dev but I get this error even installing node_modules

bdul@abdul-ASUS-TUF-Dash-F15-FX516PM-FX516PM:~/Descargas/site-main(2)/site-main$ npm run dev

opensanctions.org@1.0.0 dev /home/abdul/Descargas/site-main(2)/site-main npm run fetch-data && next dev

opensanctions.org@1.0.0 fetch-data /home/abdul/Descargas/site-main(2)/site-main node scripts/fetch-data.js

Fetch: https://data.opensanctions.org/datasets/latest/index.json -> /home/abdul/Descargas/site-main(2)/site-main/data/index.json /home/abdul/Descargas/site-main(2)/site-main/node_modules/next/dist/cli/next-dev.js:309 showAll: args["--show-all"] ?? false, ^

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 require (internal/modules/cjs/helpers.js:25:18) at Object.dev (/home/abdul/Descargas/site-main(2)/site-main/node_modules/next/dist/lib/commands.js:10:30) at Object. (/home/abdul/Descargas/site-main(2)/site-main/node_modules/next/dist/bin/next:141:28) at Module._compile (internal/modules/cjs/loader.js:778:30) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! opensanctions.org@1.0.0 dev: npm run fetch-data && next dev npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the opensanctions.org@1.0.0 dev 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/abdul/.npm/_logs/2023-02-08T02_13_15_698Z-debug.log abdul@abdul-ASUS-TUF-Dash-F15-FX516PM-FX516PM:~/Descargas/site-main(2)/site-main$

pudo commented 1 year ago

Might be this? https://stackoverflow.com/questions/74707066/nextjs-unexpected-token

abduli123 commented 1 year ago

Problem solved thank you