Problem when creating or starting an ionic project in macos

1

I'm trying to install ionic on my macbook, and I've had a lot of trouble trying to install NODE and npm, in the end I managed to install everything without any errors, but when I try to start the project, with this command:

sudo ionic start ionicApp

I get the following error:

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://npm.community>
[ERROR] An error occurred while running subprocess npm.

    npm i exited with exit code 1.

    Re-running this command with the --verbose flag may provide more 
    information.

node version: v8.11.4 npm version: v6.4.1

I have tried with all the help that you get for the console, it is perfectly installed, and the truth is that this is starting to be a headache more than anything else. EDIT: I have finished formatting the pc, and I have managed to install without any errors, but when I try to create or start a project, I still say 'permission denied' even using sudo in the commands, The command I use is this: sudo ionic start prueba and the error that throws me is this:

gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Volumes/datos/Proyectos/ionicApp/node_modules/node-sass/build'
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/bin/node" "/Volumes/datos/Proyectos/ionicApp/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Volumes/datos/Proyectos/ionicApp/node_modules/node-sass
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: 'node scripts/build.js'
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall 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/davidpazolopez/.npm/_logs/2018-09-12T10_43_52_021Z-debug.log
[ERROR] An error occurred while running subprocess npm.

    npm i exited with exit code 1.

    Re-running this command with the --verbose flag may provide more 
    information.

With which I do not know what kind of problem can exist with permissions and npm but I will have to try to do it with manw or with the npm handler.

Greetings and I hope you can help me.

Thank you in advance ...

    
asked by Peisou 10.09.2018 в 08:04
source

1 answer

0

I have managed to solve it by activating the mac root user,

The steps that I have followed are:

System preferences-> Users and groups- > Access .. to network account server, and in edit you give to activate root user.

I hope it could be helpful to someone else who has a similar problem, it is not a solution, but at least it has solved my problem.

Greetings.

    
answered by 12.09.2018 / 13:15
source