fix: typescript template has an error in package.json
Closed this issue · 0 comments
hulxv commented
Problem
when you try to install the deps of typescript
template, you will get this error:
$ yarn
error SyntaxError: /home/user/hello-metassr-ts/package.json: Expected double-quoted property name in JSON at position 468 (line 14 column 3)
at JSON.parse (<anonymous>)
at /usr/lib/node_modules/yarn/lib/util/fs.js:755:57
at Generator.next (<anonymous>)
at step (/usr/lib/node_modules/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
Solution
{
"name": "hello-metassr-ts",
"version": "1.0.0",
"description": "A web application built with MetaSSR framework",
"scripts": {
"run": "metassr-cli --debug-mode=http run",
"build:ssr": "metassr-cli --debug-mode=metacall build -t ssr",
"serve:ssg": "metassr-cli --debug-mode=http run --serve",
"build:ssg": "metassr-cli --debug-mode=metacall build -t ssg",
"dev": "rspack --watch"
},
"devDependencies": {
"@rspack/core": "^0.7.5", <== the comma should be removed
},
"dependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
}
}