Error on installing mockup

I have been trying this for over an hour. I cloned the mockup repo, installed node, and then phantomJS.
I went on to execute the command
make bootstrap , and it threw the following error.

What am I missing here?

Hi @janga1997,

Apparently you have run the install with sudo (so your npm dependencies have been deployed in /usr/lib/node_modules) and now you are running make with your regular system account, so it fails (see the error message: "permission denied '/usr/lib/node_modules/mockup'").
So you would be better to make a new fresh install without sudo.

Note: if you have problem with npm dependencies, you should consider using a tool like nodeenv or nvm.

No, just a fresh install of mockup project.
Mockup should not be in /usr/lib/node_modules

by the way, instead of running make bootstrap, you should start with running npm install and see what it says (makefile are nice as long as you knwo what they do and why they fail, if you don't, it is easier to run the commands by yourself to understand and debug).

Thanks for the reply @ebrehault

Where did I use the command sudo in running the install?
I cloned the repo. And I changed the directory. And then i ran the make command. where did I use the sudo command?

I simply followed the instructions given at

Well, I don't know, but it looks like npm is putting your modules in /usr/lib, so there is something wrong somewhere.

We often have that kind of issues when using the system's npm.
So just use nvm, it will clean that up.

So , I install nvm, and then run the same command make bootstrap?

After installing nvm, you will need to activate it in your mockup folder (so you will not use the system nvm anymore), and then you can make bootstrap.

@ebrehault I understand what you mean.

But how do I do that? how do I activate nvm in my mockup folder ? What are the commands? ( That is my problem mainly, I don't know the commands for stuff you find trivial. )

This sounds like some additional documentation would be really helpful.
@janga1997 if you've got it working please write a blog post about it. That would be really helpful!

I will write a blog post about it, when I get it working!
I just need to know how to activate nvm in the mockup folder. hopefully that will be the end of it.

@janga1997 After cloning mockup.git make sure that your directory structure looks like this-

'Makefile' must be in the same directory from where you are running make bootstrap command.

Secondly you need to have root privileges for doing this, do this instead-
sudo make bootstrap

:thumbsup: :

1 Like