mathigon / studio

A customisable NodeJS server for creating and hosting highly interactive online courses.
https://mathigon.io
Other
37 stars 20 forks source link

When trying to copy the example app and install mathigon studio, getting an error. #254

Open nutanc opened 1 year ago

nutanc commented 1 year ago

Copied the example folder.

Installed mathigon studio 0.1.26. When I do npm run dev, get the following error.

docs/example/node_modules/@mathigon/studio/server/app.ts:7 import crypto from 'crypto'; ^^^^^^

SyntaxError: Cannot use import statement outside a module at Object.compileFunction (node:vm:352:18) at wrapSafe (node:internal/modules/cjs/loader:1031:15) at Module._compile (node:internal/modules/cjs/loader:1065:27) at Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Object.require.extensions. [as .ts] (/home/chaitanya/code/node/innings2/chetan/studio/docs/example/node_modules/ts-node/src/index.ts:1608:43) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object. (/home/chaitanya/code/node/innings2/chetan/studio/docs/example/server/app.ts:7:1)

akhtarshahnawaz commented 1 month ago

I am having the same issue