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->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@example.com dev /home/un/test > nuxt sh: /home/un//test/node_modules/.bin/nuxt: Permission denied npm ERR! code ELIFECYCLE npm ERR! errno 126 npm ERR! firstname.lastname@example.org dev: `nuxt` npm ERR! Exit status 126 npm ERR! npm ERR! Failed at the email@example.com 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
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.