0
我是node.js上的newby。我想解析一個xml文件到json中,所以我試圖使用https://github.com/blue-button/bluebutton.js的bulebutton庫。 首先,我已經通過命令npm install bluebutton安裝了模塊,並使用bluebutton模塊創建了一個node_modules文件夾。 現在我創建了一個test.js文件,下面的代碼導出節點模塊爲本地錯誤
var bb = require('bluebutton');
var myRecord = bb.BlueButton('./asd.xml');
console.log(myRecord);
但它給了我一個錯誤,bluebutton沒有定義。請幫我figureout這個問題感謝
無其不同的模塊其bluebutton不bluebutton –