问题
I am getting an error in the following code on the first line:
if (typeof module != ‘undefined’ && module.exports) {
module.exports = PushNotification;
}
This is the error:

I cannot seem to find the syntax error here. I am trying to use PushPlugin for iOS.
回答1:
It looks like you copy-pasted out of a rich text document and it inserted smart quotes:
‘undefined’
Replace them with regular quotes:
'undefined'
来源:https://stackoverflow.com/questions/22237301/how-to-fix-javascript-unexpected-token-illegal