測(cè)試文件只是很簡(jiǎn)單的: var request = require('request');var crypto = require('crypto');但是會(huì)報(bào)錯(cuò): ERROR in ./~/.npminstall/tough-cookie/2.3.1/tough-cookie/package.json
Module parse failed: C:\Users\Administrator\Desktop\submail\submail\node_modules
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (2:10)
at Parser.pp$4.raise (C:\Users\Administrator\AppData\Roaming\npm\node_module
at Parser.pp.unexpected (C:\Users\Administrator\AppData\Roaming\npm\node_mod
at Parser.pp.semicolon (C:\Users\Administrator\AppData\Roaming\npm\node_modu
at Parser.pp$1.parseExpressionStatement (C:\Users\Administrator\AppData\Roam
at Parser.pp$1.parseStatement (C:\Users\Administrator\AppData\Roaming\npm\no
at Parser.pp$1.parseBlock (C:\Users\Administrator\AppData\Roaming\npm\node_m
at Parser.pp$1.parseStatement (C:\Users\Administrator\AppData\Roaming\npm\no
為什么 webpack require('request')服務(wù)器端之類的模塊會(huì)報(bào)錯(cuò)?
UYOU
2018-09-04 13:33:34