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

SyntaxError: Unexpected token ? #18

Open
Andrew-M-C opened this issue Apr 1, 2024 · 0 comments
Open

SyntaxError: Unexpected token ? #18

Andrew-M-C opened this issue Apr 1, 2024 · 0 comments

Comments

@Andrew-M-C
Copy link

Ubuntu 20.04,按照 README 说明放了 3d0d7e5fb2ce288813306e4d4636395e047a3d2831bb7ba8914766d4ba40d6dfb6113c8b614be442 两个文件之后,执行 npm run cli,报错:


> ios-message-export@1.0.0 cli /root/projects/github.com/harrisoff/ios-message-export
> npm run build&&node dist/cli/index.js


> ios-message-export@1.0.0 build /root/projects/github.com/harrisoff/ios-message-export
> tsc -p .

/usr/local/lib/node_modules/typescript/lib/tsc.js:93
  for (let i = startIndex ?? 0; i < array.length; i++) {
                           ^

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.<anonymous> (/usr/local/lib/node_modules/typescript/bin/tsc:2:1)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ios-message-export@1.0.0 build: `tsc -p .`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ios-message-export@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2024-04-01T01_26_41_454Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ios-message-export@1.0.0 cli: `npm run build&&node dist/cli/index.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ios-message-export@1.0.0 cli script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2024-04-01T01_26_41_482Z-debug.log

不会 typescript,求大佬帮忙看看?

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

1 participant