Open nileshtrivedi opened 1 year ago
I suspect that the bundleScripts
method in assets.js
(which is used as mgon-build
) is not passing compiler options correctly.
`> @mathigon/textbooks@0.7.4 start
npm-run-all --parallel watch server
@mathigon/textbooks@0.7.4 watch mgon-build --assets --watch --locales en
@mathigon/textbooks@0.7.4 server mgon-serve
✔ Built icons.svg in 36ms
I:\01_代码\mathigon.org\textbooks\node_modules\ts-node\src\index.ts:859
return new TSError(diagnosticText, diagnosticCodes, diagnostics);
^
TSError: ⨯ Unable to compile TypeScript:
node_modules/@mathigon/studio/server/utilities/utilities.ts:79:21 - error TS2345: Argument of type '{}' is not assignable to parameter of type 'Obj
79 deep ? deepExtend(studio, project, (a, b) => b) : Object.assign(studio as any, project); ~~
at createTSError (I:\01_代码\mathigon.org\textbooks\node_modules\ts-node\src\index.ts:859:12)
at reportTSError (I:\01_代码\mathigon.org\textbooks\node_modules\ts-node\src\index.ts:863:19)
at getOutput (I:\01_代码\mathigon.org\textbooks\node_modules\ts-node\src\index.ts:1077:36)
at Object.compile (I:\01_代码\mathigon.org\textbooks\node_modules\ts-node\src\index.ts:1433:41)
at Module.m._compile (I:\01_代码\mathigon.org\textbooks\node_modules\ts-node\src\index.ts:1617:30)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Object.require.extensions.<computed> [as .ts] (I:\01_代码\mathigon.org\textbooks\node_modules\ts-node\src\index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Function.Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19) {
diagnosticCodes: [ 2345 ] } ERROR: "server" exited with 1.` I have also encountered a similar error. How can I solve it? Thank you!
@mougedashu I think this has been fixed in this commmit but studio package has not been published to npm yet.
For now, you can try replacing @mathigon/studio
version 0.1.37 to @dhimath/studio
version 0.1.38. But you will also have to replace all import statements in files like functions.ts
to import ... from '@dhimath/studio';
@plegner If you could publish latest version of the studio package, that would be great. BTW, the docs/example
shows this error:
@nileshtrivedi,I have successfully solved the problem according to the method you provided. Thank you!
Also this:
I see this error when running
npm start
for the latest commit in the textbooks repo which changed studio dependency from 0.1.35 to 0.1.36.