surmon-china / surmon.me

🌱 My digital garden, powered by myself.
https://surmon.me
MIT License
2.11k stars 594 forks source link

yarn build||yarn build:ssr 报错 #195

Closed YouSmart2016 closed 2 years ago

YouSmart2016 commented 3 years ago

yarn run v1.22.10mon.me>yarn build $ npm run build:ssr

surmon.me@3.0.3 build:ssr E:\githubcode\surmon.me node ./vuniversal/build

[Server] 🔵 building...

yarn run v1.22.10mon.me>yarn build:ssr $ node ./vuniversal/build [Server] 🔵 building...

weidongbcn commented 3 years ago

debian@debian-PS63-Modern-8M:~/2109/surmon.me$ yarn dev yarn run v1.22.5 $ npm run dev:ssr

surmon.me@3.0.3 dev:ssr /home/debian/2109/surmon.me node ./vuniversal/dev

/home/debian/2109/surmon.me/vuniversal/dev.js:49 ...vunConfig.watchOptions?.awaitWriteFinish ^

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 Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! surmon.me@3.0.3 dev:ssr: node ./vuniversal/dev npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the surmon.me@3.0.3 dev:ssr script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/debian/.npm/_logs/2021-05-18T20_38_32_930Z-debug.log error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. debian@debian-PS63-Modern-8M:~/2109/surmon.me$

我的报这个错误..

fengqs520xy commented 3 years ago

在public里面index.html找到 这个两个,并且注释掉。然后是可以启动的

surmon-china commented 2 years ago

现在更新了,此问题不再存在;主分支的代码已经拥有完备、成熟的 SSR 最佳实践。