Locally develop node module

First of all, I want to develop my own node module.

I start to develop from scratch and now I want to test it in the Laravel (PHP framework) and use the 'npm link' to link the folder into the Laravel node module.

This is the package.json in my module

{
  "name": "@blacklotus1998/visualiser",
  "version": "1.0.0",
  "description": "A library used to visualising the data",
  "main": "./main.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC"
}

After that, I try to run it and get the error like this:

Error of the npm run watch

I don't even know why this will show up.

(Edited)

I try to just move my module folder to the node module folder without using “npm link”. And what, it just works fine~

But using this method is hard for the development process.

Thanks for any help.

728x90

0 Answers Locally develop node module