tejado / telegram-nearby-map

Discover the location of nearby Telegram users 📡🌍
GNU General Public License v3.0
1.04k stars 149 forks source link

Solved: Parcel SyntaxError: Invalid or unexpected token #26

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hello,

Using as OS: Almalinux

npm --version 6.14.11

node --version

v10.24.0


npm install audited 325 packages in 2.11s

78 packages are looking for funding run npm fund for details

found 0 vulnerabilities


Got the following error when issue: npm start

Any help much appreciated!

TIA


# npm start

> telegram-nearby-map@ start /root/TG/telegram-nearby-map
> npm run buildParcel && npm run startServer

> telegram-nearby-map@ buildParcel /root/TG/telegram-nearby-map
> parcel build ./web-src/index.html --public-url / --dist-dir ./web-build/

/root/TG/telegram-nearby-map/node_modules/@parcel/core/lib/Parcel.js:150
  #requestTracker
  ^

SyntaxError: Invalid or unexpected token
    at new Script (vm.js:83:7)
    at NativeCompileCache._moduleCompile (/root/TG/telegram-nearby-map/node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
    at Module._compile (/root/TG/telegram-nearby-map/node_modules/v8-compile-cache/v8-compile-cache.js:184:36)
    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 (/root/TG/telegram-nearby-map/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (/root/TG/telegram-nearby-map/node_modules/@parcel/core/lib/index.js:81:39)
/root/TG/telegram-nearby-map/node_modules/@parcel/logger/lib/Logger.js:41
  #logEmitter
  ^

SyntaxError: Invalid or unexpected token
    at new Script (vm.js:83:7)
    at NativeCompileCache._moduleCompile (/root/TG/telegram-nearby-map/node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
    at Module._compile (/root/TG/telegram-nearby-map/node_modules/v8-compile-cache/v8-compile-cache.js:184:36)
    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 _logger (/root/TG/telegram-nearby-map/node_modules/parcel/lib/cli.js:54:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! telegram-nearby-map@ buildParcel: `parcel build ./web-src/index.html --public-url / --dist-dir ./web-build/`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the telegram-nearby-map@ buildParcel 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/2022-03-14T08_20_18_489Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! telegram-nearby-map@ start: `npm run buildParcel && npm run startServer`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the telegram-nearby-map@ start 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/2022-03-14T08_20_18_504Z-debug.log```
ghost commented 2 years ago

Solved. Upgraded nodejs to 14 (clean cache and node_modules folder) and did npm install + np start. Works flawlessly.

Thank to all!

ghost commented 2 years ago

Solved.