I joined to ask this question as it did not seem like a stack overflow question.

Question: Node and npm running on nvm installed and working, but nothing (that I have tried) works as I get errors. I suspect the errors are at the OS level (permissions or a file issue) but I am not sure how to go about solving these. Could you tell me either what is wrong (if there is enough info below) or where to look for a solution (if the info below is not enough or incorrect).

I have been on Manjaro for a while and I am still a beginner on Linux. I had been using NVM to manage multiple node.js versions and a while ago it stopped working. I only use my computer sometimes and I had assumed it was some node issue but today I went in and completely removed nvm/node then reinstalled them. Then I tried to start a standard NUXT app and it failed so I think it is at the OS level.

I have NVM installed, I then install the LTS node (12.14) then I try a new nuxt project:

npx create-nuxt-app test

Answer all the questions, instillation starts... Lots of errors - but it finishes... Example from errors:

../lib/kerberos.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE Kerberos::AuthGSSServerStep(Nan::NAN_METHOD_ARGS_TYPE)’:
../lib/kerberos.cc:802:44: error: no matching function for call to ‘v8::Value::ToObject()’
  802 |   Local<Object> object = info[0]->ToObject();
      |                                            ^
In file included from /home/un/.cache/node-gyp/12.14.0/include/node/node.h:63,
                 from ../lib/kerberos.h:4,
                 from ../lib/kerberos.cc:1:
/home/un/.cache/node-gyp/12.14.0/include/node/v8.h:2576:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
 2576 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
      |                                            ^~~~~~~~
/home/un/.cache/node-gyp/12.14.0/include/node/v8.h:2576:44: note:   candidate expects 1 argument, 0 provided

node-gyp seems to be a common item in the errors, and the npm page says it is "for compiling native addon modules for Node.js" which is why I was thinking it was an OS level issue.

so the app is set up, but when I try to run

npm run dev

I get the following:

> [email protected] dev /home/un/test
> nuxt

sh: /home/un//test/node_modules/.bin/nuxt: Permission denied
npm ERR! errno 126
npm ERR! [email protected] dev: `nuxt`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the [email protected] dev 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/un/.npm/_logs/2020-01-03T15_35_00_168Z-debug.log

Note for those not familiar with node/npm/NUXT: This is just the standard instillation process. There is no custom code from me here, this is what lots of people use to start a project all the time so I can't understand why it is not working (especially when it used to be working).

I was wondering if the 'permission denied' means it is a user access issue but I am not sure how to check.

I also get some errors about files been newer when doing a system update.

I would appreciate any help. If you don't have a solution then at least some advice on what might be the issue or where to look for solutions.

Let me know if you want any additional info.

Also not sure what other tags to add? file-errors, instillation, update-issues

Edit: File permissions: Node in .nvm/versions/v12.14.0 is -rwxr-xr-x while npm and npx are lrwxrwxrwx which link to the actual npm with -rwxr-xr-x but the actual npx is -rw-r--r-- (no executable for the user) but I have never changed these and like I said, it used to work. Every folder in node_modules has drwxr-xr-x, I looked in one folder and the js files are -rw-r--r-- (but I assume as they are JavaScript they wont need to be executed...

Edit2: I just noticed that there is no .bin folder in my node_modules folder and there is no nuxt folder at all, but I would think that this would be a file not found error instead of 'Permission denied'.

I then tried chmod 775 -R node_modules and ran build again. This time it created the .bin file but still failed on webpack (node_modules/.bin/webpack: Permission denied) although this link was lrwxrwxrwx and the original file is -rwxrwxr-x

While this made things change, I am still unable to start the project. I also think this is not a normal way to deal with this. if it was, the website would say this was a requirement.

2 Answers 2


As you were wondering I think it's a permission issue. Try checking if the user you're in can execute file /home/un//test/node_modules/.bin/nuxt and check if the folder /home/un//test/node_modules/.bin/ doesn't have SUID or/and SGID bits set. I guess not, because node_modules folders are generated automatically by npm, but I think you should just give permissions for the whole catalog recursively according to your user account which is going to run that service.

  • Thanks for the suggestion, see my edits above, it does not look like changing permissions solved it (but let me know if I need to try different files or different permissions).
    – Totoro
    Jan 3, 2020 at 17:32

OK, the issue was not what I was expecting. I had my node files on a btrfs hard disk. It seems that this is why it didn't work.

I had moved them there but I thought it was still working, either that was a mistake or it started to not work.

At any rate, moving the files to my main HD (ext4) has fixed the issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .