Fixed #3501: Modify some codes for NPM

Modify some codes for NPM