You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Cannot find module './beautify.js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at /Users/ganyouyin/Documents/____tmp____/test/node_modules/js-beautify-sourcemap/dist/js-beautify-sourcemap.js:4065:27
at /Users/ganyouyin/Documents/____tmp____/test/node_modules/js-beautify-sourcemap/dist/js-beautify-sourcemap.js:4082:3
at /Users/ganyouyin/Documents/____tmp____/test/node_modules/js-beautify-sourcemap/dist/js-beautify-sourcemap.js:8:82
at Object.<anonymous> (/Users/ganyouyin/Documents/____tmp____/test/node_modules/js-beautify-sourcemap/dist/js-beautify-sourcemap.js:11:2)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
定位到代码:
}elseif(typeofexports!=="undefined"){// Add support for CommonJS. Just put this file somewhere on your require.paths// and you will be able to `var html_beautify = require("beautify").html_beautify`.varjs_beautify=require('./beautify.js');varcss_beautify=require('./beautify-css.js');exports.html_beautify=function(html_source,options){returnstyle_html(html_source,options,js_beautify.js_beautify,css_beautify.css_beautify);};}elseif(typeofwindow!=="undefined"){
改成如下代码后可正常工作:
}elseif(typeofexports!=="undefined"){// Add support for CommonJS. Just put this file somewhere on your require.paths// and you will be able to `var html_beautify = require("beautify").html_beautify`.varjs_beautify=require('js-beautify');exports.html_beautify=function(html_source,options){returnstyle_html(html_source,options,js_beautify.js_beautify,js_beautify.css_beautify);};}elseif(typeofwindow!=="undefined"){
The text was updated successfully, but these errors were encountered:
使用方式:
之后执行:
报错信息:
定位到代码:
改成如下代码后可正常工作:
The text was updated successfully, but these errors were encountered: