alienzhou / web-highlighter

✨ A no-runtime dependency lib for text highlighting & persistence on any website ✨🖍️
https://alienzhou.github.io/web-highlighter/
MIT License
890 stars 144 forks source link

npm start失败 #36

Closed zhangkai253 closed 4 years ago

zhangkai253 commented 4 years ago

$ npm start

web-highlighter@0.5.0 start E:\node_project\web-highlighter node script/dev.js

[convert] E:\node_project\web-highlighter\README.md - converting... [convert] E:\node_project\web-highlighter\README.md - convert md to html success! i 「wds」: Project is running at http://0.0.0.0:8085/ i 「wds」: webpack output is served from undefined i 「wds」: Content not from webpack is served from E:\node_project\web-highlighter\example\static Starting the development server...

E:\node_project\web-highlighter\node_modules\open\index.js:29 ...options ^^^

SyntaxError: Unexpected token ... at createScript (vm.js:74:10) at Object.runInThisContext (vm.js:116:10) at Module._compile (module.js:533:28) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:503:32) at tryModuleLoad (module.js:466:12) at Function.Module._load (module.js:458:3) at Module.require (module.js:513:17) at require (internal/module.js:11:18) at startBrowserProcess (E:\node_project\web-highlighter\node_modules\better-opn\dist\index.js:81:10) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! web-highlighter@0.5.0 start: node script/dev.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the web-highlighter@0.5.0 start 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! C:\Users\d\AppData\Roaming\npm-cache_logs\2020-04-17T07_10_28_121Z-debug.log

alienzhou commented 4 years ago

It looks like your nodejs doesn't support Object Rest/Spread Properties. Updating nodejs to a higher version (>= 8.6.0) may help.

web-highlighter uses better-open in devDependencies which depends on the package open. And open use this syntax.