0

I am working on building the marketplace dapp from dapp university on Youtube. While running truffle compile it gives me the following error

Error: Cannot find module 'babel-register'

In this answer: Error: Cannot find module 'babel-register' someone suggested that I delete package-lock and do npm install again.

but when I searched up how to delete package-lock,I found this Deleting `package-lock.json` to Resolve Conflicts quickly which pretty much says that "don't ever delete package-lock.json."

I am a beginner, any help is appreciated.

1 Answers1

0

Keep in mind that some of the dependencies in that source code are outdated.

I avoided this specific issue by running npm audit fix --force after npm install

I then ran npm install -g npm-check-updates to update all of the packages.

ncu -u will also upgrade those dependecies directly in the json.

Finally, npm update

truffle compile should now work as expected.

Good luck in your blockchain development! I'm just starting myself :)