Giter Club home page Giter Club logo

Comments (6)

ornicar avatar ornicar commented on August 12, 2024 1

Thanks, fixed and improved

from api.

jingwenw avatar jingwenw commented on August 12, 2024

Thanks for your quick response and support - the instructions in READM.md is so clear, very professional!

But after updating this repo, and follow READM.dm, I still get the error when yarn start:

james@vsbox16:/myRepos/wjw/lila-api/example/board-api/front$ cd ../back/
james@vsbox16:
/myRepos/wjw/lila-api/example/board-api/back$ yarn install
yarn install v1.22.10
warning ../package.json: No license field
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.37s.
james@vsbox16:~/myRepos/wjw/lila-api/example/board-api/back$ yarn start
yarn run v1.22.10
warning ../package.json: No license field
$ nodemon src/index.ts
[nodemon] 2.0.5
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): .
[nodemon] watching extensions: ts,json
[nodemon] starting ts-node src/index.ts
/home/james/myRepos/wjw/lila-api/example/board-api/back/src/router.ts:25
const auth = await env.mongo.auth.get(req.session?.authId || '');
^

SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Module.m._compile (/home/james/myRepos/wjw/lila-api/example/board-api/back/node_modules/ts-node/src/index.ts:1043:23)
at Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Object.require.extensions. [as .ts] (/home/james/myRepos/wjw/lila-api/example/board-api/back/node_modules/ts-node/src/index.ts:1046:12)
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. (/home/james/myRepos/wjw/lila-api/example/board-api/back/src/index.ts:6:1)
[nodemon] app crashed - waiting for file changes before starting...

Thanks,
James

from api.

ornicar avatar ornicar commented on August 12, 2024

hmm idk, can't reproduce it. What does ts-node --version say?

from api.

jingwenw avatar jingwenw commented on August 12, 2024

$ ts-node --version
ts-node: command not found

So it seems ts-node is missing in my evn?

Thanks

from api.

jingwenw avatar jingwenw commented on August 12, 2024

Now I installed ts-node v9.1.1 and still see the error:

james@vsbox16:/myRepos/wjw/lila-api/example/board-api/back$ ts-node
ts-node ts-node-script ts-node-transpile-only
james@vsbox16:
/myRepos/wjw/lila-api/example/board-api/back$ ts-node -v
v9.1.1
james@vsbox16:/myRepos/wjw/lila-api/example/board-api/back$ yarn install
yarn install v1.22.10
warning ../package.json: No license field
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.33s.
james@vsbox16:
/myRepos/wjw/lila-api/example/board-api/back$ yarn start
yarn run v1.22.10
warning ../package.json: No license field
$ nodemon src/index.ts
[nodemon] 2.0.5
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): .
[nodemon] watching extensions: ts,json
[nodemon] starting ts-node src/index.ts
/home/james/myRepos/wjw/lila-api/example/board-api/back/src/router.ts:25
const auth = await env.mongo.auth.get(req.session?.authId || '');
^

SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Module.m._compile (/home/james/myRepos/wjw/lila-api/example/board-api/back/node_modules/ts-node/src/index.ts:1043:23)
at Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Object.require.extensions. [as .ts] (/home/james/myRepos/wjw/lila-api/example/board-api/back/node_modules/ts-node/src/index.ts:1046:12)
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. (/home/james/myRepos/wjw/lila-api/example/board-api/back/src/index.ts:6:1)
[nodemon] app crashed - waiting for file changes before starting...

^C
james@vsbox16:~/myRepos/wjw/lila-api/example/board-api/back$

Thanks,

from api.

jingwenw avatar jingwenw commented on August 12, 2024

And nodejs is 12.20.1:

james@vsbox16:/myRepos/wjw/lila-api/example/board-api/back$ node -v
v12.20.1
james@vsbox16:
/myRepos/wjw/lila-api/example/board-api/back$

from api.

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.