Open bytegolang opened 2 years ago
报错是什么?有没有项目地址可以看看
报错是什么?有没有项目地址可以看看
yarn run v1.22.10 $ vuepress dev docs Error: Cannot find module '@vuepress/shared-utils' Require stack:
/mnt/d/gowork/github.com/bytegolang/bytego.dev/node_modules/@saintic/vuepress-plugin-utterances/index.js /mnt/d/gowork/github.com/bytegolang/bytego.dev/node_modules/@vuepress/core/lib/app/resolvePluginModule.js /mnt/d/gowork/github.com/bytegolang/bytego.dev/node_modules/@vuepress/core/lib/app/resolvePlugin.js /mnt/d/gowork/github.com/bytegolang/bytego.dev/node_modules/@vuepress/core/lib/app/appUse.js /mnt/d/gowork/github.com/bytegolang/bytego.dev/node_modules/@vuepress/core/lib/app/index.js /mnt/d/gowork/github.com/bytegolang/bytego.dev/node_modules/@vuepress/core/lib/index.js /mnt/d/gowork/github.com/bytegolang/bytego.dev/node_modules/@vuepress/cli/lib/commands/build/createBuild.js /mnt/d/gowork/github.com/bytegolang/bytego.dev/node_modules/@vuepress/cli/lib/commands/build/index.js /mnt/d/gowork/github.com/bytegolang/bytego.dev/node_modules/@vuepress/cli/lib/commands/index.js /mnt/d/gowork/github.com/bytegolang/bytego.dev/node_modules/@vuepress/cli/lib/index.js /mnt/d/gowork/github.com/bytegolang/bytego.dev/node_modules/vuepress/bin/vuepress.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15) at Function.Module._load (internal/modules/cjs/loader.js:746:27) at Module.require (internal/modules/cjs/loader.js:974:19) at require (internal/modules/cjs/helpers.js:92:18) at Object. (/mnt/d/gowork/github.com/bytegolang/bytego.dev/node_modules/@saintic/vuepress-plugin-utterances/index.js:1:18) at Module._compile (internal/modules/cjs/loader.js:1085:14) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10) at Module.load (internal/modules/cjs/loader.js:950:32) at Function.Module._load (internal/modules/cjs/loader.js:790:14) at Module.require (internal/modules/cjs/loader.js:974:19) error Command failed with exit code 1.
很久没关注vuepress,注意到你的package用到 "vuepress": "^2.0.0-beta.27"
,应该是版本不兼容,使用 1.x 试试看
config.js
plugins: [ [ '@saintic/utterances', { repo: 'bytegolang/bytego.dev', theme: 'github-light', issueTerm: 'pathname' } ] ]
package.json
"devDependencies": { "@saintic/vuepress-plugin-utterances": "^0.2.0", "vuepress": "^2.0.0-beta.27" },
执行 yarn docs:dev yarn run v1.22.10 $ vuepress dev docs Error: Cannot find module '@vuepress/shared-utils' Require stack:
at Function.Module._load (internal/modules/cjs/loader.js:746:27) at Module.require (internal/modules/cjs/loader.js:974:19) at require (internal/modules/cjs/helpers.js:92:18) at Object.
at Module.load (internal/modules/cjs/loader.js:950:32) at Function.Module._load (internal/modules/cjs/loader.js:790:14) at Module.require (internal/modules/cjs/loader.js:974:19) error Command failed with exit code 1.