Subscribe on changes!

package with repl error, "useModel" is not exported by vue

avatar
Aug 6th 2023

Vue version

3.2.47

Link to minimal reproduction

https://github.com/HScarb/knowledge/actions/runs/5775639375/job/15653882432

Steps to reproduce

I'm building a vuepress2 website using vuepress-theme-hope 2.x.

When I run pnpm docs:build, the error occurs.

What is expected?

build successfully

What is actually happening?

pnpm docs:build

> knowledge@2.0.0 docs:build E:\WS\Notes\knowledge\docs
> vuepress build src

✔ Initializing and preparing data - done in 4.38s
"useModel" is not exported by "node_modules/.pnpm/registry.npmmirror.com+vue@3.2.47/node_modules/vue/dist/vue.runtime.esm-bundler.js", imported by "node_modules/.pnpm/registry.npmmirror.com+@vue+repl@2.5.6/node_modules/@vue/repl/dist/vue-repl.js".
file: E:/WS/Notes/knowledge/docs/node_modules/.pnpm/registry.npmmirror.com+@vue+repl@2.5.6/node_modules/@vue/repl/dist/vue-repl.js:1:458
1: import { defineComponent, computed, ref, inject, reactive, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, renderSlot, withModifiers, toDisplayString, watch, createBlock, Transition, withCtx, createCommentVNode, onMounted, onUnm
ounted, watchEffect, Fragment, withDirectives, vShow, createVNode, renderList, unref, version, withKeys, vModelText, pushScopeId, popScopeId, useModel, provide, toRef } from 'vue';

                                                                                                                                                                                    ^
2: import * as defaultCompiler from 'vue/compiler-sfc';
3: import { MagicString, babelParse, extractIdentifiers, walkIdentifiers, isStaticProperty, isInDestructureAssignment, walk } from 'vue/compiler-sfc';
✖ Compiling with vite - failed in 24.91s
RollupError: "useModel" is not exported by "node_modules/.pnpm/registry.npmmirror.com+vue@3.2.47/node_modules/vue/dist/vue.runtime.esm-bundler.js", imported by "node_modules/.pnpm/registry.npmmirror.com+@vue+repl@2.5.6/node_modules/@vue/repl/dist/vue-repl.js".      
    at error (file:///E:/WS/Notes/knowledge/docs/node_modules/.pnpm/registry.npmmirror.com+rollup@3.27.2/node_modules/rollup/dist/es/shared/node-entry.js:2245:30)
    at Module.error (file:///E:/WS/Notes/knowledge/docs/node_modules/.pnpm/registry.npmmirror.com+rollup@3.27.2/node_modules/rollup/dist/es/shared/node-entry.js:13604:16)
    at Module.traceVariable (file:///E:/WS/Notes/knowledge/docs/node_modules/.pnpm/registry.npmmirror.com+rollup@3.27.2/node_modules/rollup/dist/es/shared/node-entry.js:14029:29)
    at ModuleScope.findVariable (file:///E:/WS/Notes/knowledge/docs/node_modules/.pnpm/registry.npmmirror.com+rollup@3.27.2/node_modules/rollup/dist/es/shared/node-entry.js:12547:39)
    at FunctionScope.findVariable (file:///E:/WS/Notes/knowledge/docs/node_modules/.pnpm/registry.npmmirror.com+rollup@3.27.2/node_modules/rollup/dist/es/shared/node-entry.js:7082:38)
    at ChildScope.findVariable (file:///E:/WS/Notes/knowledge/docs/node_modules/.pnpm/registry.npmmirror.com+rollup@3.27.2/node_modules/rollup/dist/es/shared/node-entry.js:7082:38)
    at Identifier.bind (file:///E:/WS/Notes/knowledge/docs/node_modules/.pnpm/registry.npmmirror.com+rollup@3.27.2/node_modules/rollup/dist/es/shared/node-entry.js:8267:40)
    at CallExpression.bind (file:///E:/WS/Notes/knowledge/docs/node_modules/.pnpm/registry.npmmirror.com+rollup@3.27.2/node_modules/rollup/dist/es/shared/node-entry.js:5850:23)
    at CallExpression.bind (file:///E:/WS/Notes/knowledge/docs/node_modules/.pnpm/registry.npmmirror.com+rollup@3.27.2/node_modules/rollup/dist/es/shared/node-entry.js:9833:15)
    at VariableDeclarator.bind (file:///E:/WS/Notes/knowledge/docs/node_modules/.pnpm/registry.npmmirror.com+rollup@3.27.2/node_modules/rollup/dist/es/shared/node-entry.js:5850:23)
 ELIFECYCLE  Command failed with exit code 1.

System Info

windows 10 / ubuntu-latest

Any additional comments?

  registry.npmmirror.com/@vue/repl@2.5.6:
    resolution: {integrity: sha512-/02AwGovcbBc+bWy33yOhnXX4MVpGO+iPWRUyBq8TgMK3xsCES5Q/b0cZCULFDSaQ0YkFgxIpcSlM/9PNlFgpg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@vue/repl/-/repl-2.5.6.tgz}
    name: '@vue/repl'
    version: 2.5.6
    dev: true