added npm install options and fixed a defect