Dex*_*ter 3 node.js npm vue.js vuejs2 vue-cli
我正在尝试运行简单的vue
项目。但是,不知何故,我无法在我的openSUSE TW (20200615) 系统上运行它。我正在使用 NVM 进行节点安装。以下是我的环境
nvm --version # 0.35.3
node --version # v14.4.0
npm --version # 6.14.5
vue --version # @vue/cli 4.4.4
Run Code Online (Sandbox Code Playgroud)
我正在遵循典型的 hello world 教程
vue create hello-world
cd hello-world
npm run serve
Run Code Online (Sandbox Code Playgroud)
我收到以下错误
> hello-world@0.1.0 serve /path/to/hello-world
> vue-cli-service serve
sh: /path/to/hello-world/node_modules/.bin/vue-cli-service: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! hello-world@0.1.0 serve: `vue-cli-service serve`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the hello-world@0.1.0 serve 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/user/.npm/_logs/2020-06-18T15_03_14_259Z-debug.log
Run Code Online (Sandbox Code Playgroud)
我已经尝试过很多事情,例如按照此处和此处的node_modules
建议重新删除和安装。尝试按照此处的建议使用 root 帐户。我什至尝试全局安装并执行此操作,但仍然出现同样的错误。我尝试将所有node_module文件的权限更改为777并运行。自过去 2 小时以来尝试了所有这些之后,我仍然遇到同样的错误。谁能告诉我发生了什么事吗?node
如果有人想要的话,这是日志文件(2020-06-18T15_03_14_259Z-debug.log)。
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/home/user/.nvm/versions/node/v14.4.0/bin/node',
1 verbose cli '/home/user/.nvm/versions/node/v14.4.0/bin/npm',
1 verbose cli 'run',
1 verbose cli 'serve'
1 verbose cli ]
2 info using npm@6.14.5
3 info using node@v14.4.0
4 verbose run-script [ 'preserve', 'serve', 'postserve' ]
5 info lifecycle hello-world@0.1.0~preserve: hello-world@0.1.0
6 info lifecycle hello-world@0.1.0~serve: hello-world@0.1.0
7 verbose lifecycle hello-world@0.1.0~serve: unsafe-perm in lifecycle true
8 verbose lifecycle hello-world@0.1.0~serve: PATH: /home/user/.nvm/versions/node/v14.4.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/path/to/hello-world/node_modules/.bin:/home/user/.nvm/versions/node/v14.4.0/bin:/home/user/Android/Sdk/platform-tools:/var/lib/snapd/snap/bin:/usr/bin:/home/user/.pyenv/bin:/home/user/bin:/usr/local/bin:/home/user/bin:/usr/local/bin:/usr/bin:/bin:/snap/bin
9 verbose lifecycle hello-world@0.1.0~serve: CWD: /path/to/hello-world
10 silly lifecycle hello-world@0.1.0~serve: Args: [ '-c', 'vue-cli-service serve' ]
11 silly lifecycle hello-world@0.1.0~serve: Returned: code: 126 signal: null
12 info lifecycle hello-world@0.1.0~serve: Failed to exec serve script
13 verbose stack Error: hello-world@0.1.0 serve: `vue-cli-service serve`
13 verbose stack Exit status 126
13 verbose stack at EventEmitter.<anonymous> (/home/user/.nvm/versions/node/v14.4.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess.<anonymous> (/home/user/.nvm/versions/node/v14.4.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1051:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid hello-world@0.1.0
15 verbose cwd /path/to/hello-world
16 verbose Linux 5.7.1-1-default
17 verbose argv "/home/user/.nvm/versions/node/v14.4.0/bin/node" "/home/user/.nvm/versions/node/v14.4.0/bin/npm" "run" "serve"
18 verbose node v14.4.0
19 verbose npm v6.14.5
20 error code ELIFECYCLE
21 error errno 126
22 error hello-world@0.1.0 serve: `vue-cli-service serve`
22 error Exit status 126
23 error Failed at the hello-world@0.1.0 serve script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 126, true ]
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
10147 次 |
最近记录: |