what is the problem with "SyntaxError: The requested module 'vue' does not provide an export named 'ssrContextKey'" #1385
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I use vuvpress to build my doc website,when I use npm run dev,it is ok,when I use npm run build,eroor occured as follows:
file:///Users/chujian/Desktop/Code/fealaskan/node_modules/@vuepress/bundler-vite/dist/index.js:256
import { ssrContextKey } from "vue";
^^^^^^^^^^^^^
SyntaxError: The requested module 'vue' does not provide an export named 'ssrContextKey'
at ModuleJob._instantiate (internal/modules/esm/module_job.js:120:21)
at async ModuleJob.run (internal/modules/esm/module_job.js:165:5)
at async Loader.import (internal/modules/esm/loader.js:177:24)
at async Object.loadESM (internal/process/esm_loader.js:68:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build:
vuepress build docs
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build 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! /Users/chujian/.npm/_logs/2023-07-16T03_14_05_817Z-debug.log
npm log:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/Users/chujian/.nvm/versions/node/v14.17.1/bin/node',
1 verbose cli '/Users/chujian/.nvm/versions/node/v14.17.1/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]
prebuild: [email protected]build: [email protected]6 info lifecycle [email protected]
7 verbose lifecycle [email protected]
build: unsafe-perm in lifecycle truebuild: PATH: /Users/chujian/.nvm/versions/node/v14.17.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/chujian/Desktop/Code/fealaskan/node_modules/.bin:/opt/homebrew/bin:/Users/chujian/bin:/usr/local/bin:/Users/chujian/.nvm/versions/node/v14.17.1/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Applications/Yunshu.app/Contents/Public:/Library/Application Support/Yunshu/Yunshu.app/Contents/Public:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/homebrew/bin:/Users/chujian/bin:/Users/chujian/.nvm/versions/node/v14.17.1/bin:/opt/homebrew/sbin8 verbose lifecycle [email protected]
9 verbose lifecycle [email protected]
build: CWD: /Users/chujian/Desktop/Code/fealaskanbuild: Args: [ '-c', 'vuepress build docs' ]10 silly lifecycle [email protected]
11 silly lifecycle [email protected]
build: Returned: code: 1 signal: nullbuild: Failed to exec build script12 info lifecycle [email protected]
13 verbose stack Error: [email protected] build:
vuepress build docs
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/Users/chujian/.nvm/versions/node/v14.17.1/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:375:28)
13 verbose stack at ChildProcess. (/Users/chujian/.nvm/versions/node/v14.17.1/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:375:28)
13 verbose stack at maybeClose (internal/child_process.js:1055:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/chujian/Desktop/Code/fealaskan
16 verbose Darwin 22.4.0
17 verbose argv "/Users/chujian/.nvm/versions/node/v14.17.1/bin/node" "/Users/chujian/.nvm/versions/node/v14.17.1/bin/npm" "run" "build"
18 verbose node v14.17.1
19 verbose npm v6.14.13
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] build:
vuepress build docs
22 error Exit status 1
23 error Failed at the [email protected] build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
it seems that I installed a wrong version with vue? thanks for ur time!
Beta Was this translation helpful? Give feedback.
All reactions