I want to add mark dowm editor to my blog, just like SF. It seems that the marked module can. Then I went to GitHub to have a look. There was a problem in the process.
The demo given by GitHub is introduced in this way
But I can’t access it when I introduce it. I return 404, and then I copied a copy of the marked module folder to the static file directory, as follows
Can quote successfully, but there are errors again
Is there a lack of dependency modules? Is there any way for node to directly access the modules in node modules?
Node can access the modules in node_modules. This is NPM’s job. You worry about not operating in the right place.Now the key is to find out where the error is undefined and analyze the reason. Let’s break the point.
- You should be able to find the module after it is installed
marked.js, and then reference it accordingly.
- If not, you can try to directly require the JS file in the node and use it to see if there is any error.
- If the error is still reported, but you do not want to debug, you can use the browser rify to encapsulate the node module and use it directly for the browser.