Having errors on X Publisher project and node

Hi, I have problems on running the migration js file, I found other topics about dezinstalling the node and installing again the node, I’ve done that but still I have the problem. Also I tried to run npm test, npm start but I got errors. Here are my errors. And another one , I can’t find the table on DB Browser. Thank you, hope someone can figure it out

migration.js errors

npm errors


I’m not quite sure what’s going on since I don’t use windows or this exact stack but this thread seems to point to a possible idea to the problem: Issue running migration.js file in x-press - #5 by jeremydmarx. The idea being that it might have to do with which version of node you’re running. You might want to search the forums with the keywords for the issue you’re having as you might get a more detailed explanation.

I’ll ask around if anybody knows this issue in the meanwhile.

Ok, thank you, I will wait and in the mean time I 'll check that thread.

Hello, it seems that you are in the wrong directory in the terminal.

The error you are getting might simply mean that the migration.js file wasn’t found. Looking at your editor it seems that all your source files are located in a directory named capstone-project-1-x… , but in the terminal, you are at path ~/X publisher project .

When you run command node migration.js this file must be in your current working directory (or accessed via the PATH system/environment variable). So before running the command simply execute command ls which will print the list of files in the current working directory.

The same goes for commands npm test and npm start - those commands need to be executed in the directory where file package.json is placed.

If you are in the wrong directory (command ls didn’t print information about file migration.js) use command cd directory_name to move between directories.

1 Like

Thank you that solved my problem, still I run in some issues but I am gonna start it again the project to install the packages.

1 Like

You’re very welcome. In case of any further problems do not hesitate to ask :slight_smile:

Thanks , I will do that.

Hey y’all,
I still recommend putting nvm (node version manager) on your machine - you never know when you need to roll back to earlier version of node.