3

I am trying to run simple vue project. However, somehow I am not able to run it on my openSUSE TW (20200615) system. I am using NVM for my node installation. Following is my environment

 nvm --version  # 0.35.3
 node --version # v14.4.0
 npm --version # 6.14.5
 vue --version # @vue/cli 4.4.4

I am following typical hello world tutorial

vue create hello-world  
cd hello-world
npm run serve

I am getting following error

> 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

I have already tried many things like removing node_modules and installing again like suggested here and here. Trying to use root account as suggested here. I have even tried installing node globally and perform this action, but still same error. I have tried to change permission of all node_module files to 777 and run. After trying all of these since last 2 hours, I am still getting same error. Can anyone tell me what is going on?

Here is the log file (2020-06-18T15_03_14_259Z-debug.log) if anyone wants it.

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 ]
Dexter
  • 1,421
  • 3
  • 22
  • 43

2 Answers2

8

The following thing worked for me

chmod -R a+x node_modules
habib
  • 1,454
  • 17
  • 31
0

very simple.

  1. open your project terminal
  2. enter the command "chmod -R a+x node_modules" thats all