2017-07-24 9 views
6

की संपत्ति 'प्रारंभ से' पढ़ नहीं सकता है मैंने https://github.com/vuejs/vue-cliwebpack template के साथ Vue CLI सेटअप किया है और यह ठीक काम करता है। लेकिन जब मैं टेम्पलेट फ़ाइल में कुछ बदलने यह त्रुटि नीचे फेंकता है।एनपीएम कंपाइलर: अपरिभाषित

कृपया नीचे दिए गए इस मुद्दे पर मदद,

> Starting dev server... 


DONE Compiled successfully in 2703ms        6:00:35 PM 

> Listening at http://localhost:8083 
WAIT Compiling...             6:01:05 PM 


c:\xampp\htdocs\myproject\node_modules\enhanced-resolve\lib\CachedInputFileSy 
stem.js:145 
         if(key.startsWith(what)) 
          ^

TypeError: Cannot read property 'startsWith' of undefined 
    at Storage.purge (c:\xampp\htdocs\myproject\node_modules\enhanced-resolve 
\lib\CachedInputFileSystem.js:145:10) 
    at Storage.purge (c:\xampp\htdocs\myproject\node_modules\enhanced-resolve 
\lib\CachedInputFileSystem.js:150:9) 
    at CachedInputFileSystem.purge (c:\xampp\htdocs\myproject\node_modules\en 
hanced-resolve\lib\CachedInputFileSystem.js:259:20) 
    at EventEmitter.watcher.once (c:\xampp\htdocs\myproject\node_modules\webp 
ack\lib\node\NodeWatchFileSystem.js:42:26) 
    at EventEmitter.g (events.js:291:16) 
    at emitTwo (events.js:106:13) 
    at EventEmitter.emit (events.js:191:7) 
    at EventEmitter._onTimeout (c:\xampp\htdocs\myproject\node_modules\watchp 
ack\lib\watchpack.js:142:7) 
    at ontimeout (timers.js:380:14) 
    at tryOnTimeout (timers.js:244:5) 
    at Timer.listOnTimeout (timers.js:214:5) 

npm ERR! Windows_NT 6.1.7601 
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x8 
6)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev" 
npm ERR! node v6.10.2 
npm ERR! npm v3.10.10 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] dev: `node build/dev-server.js` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] dev script 'node build/dev-server.js'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the dktrgo package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node build/dev-server.js 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs dktrgo 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls dktrgo 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  c:\xampp\htdocs\myproject\npm-debug.log 

आप

+1

समस्या Vue-CLI से संबंधित नहीं है, की वजह से किया जा रहा है webpack-देव-सर्वर पर निर्भरता से। https://github.com/webpack/enhanced-resolve/issues/102 – Garth

+0

बढ़िया है, धन्यवाद। इसका हल मेरी समस्या – Hari

उत्तर

14

मैं v3.4.0 में पुन: पेश करने में सक्षम था धन्यवाद, लेकिन v3.4.1 में नहीं है (जो के बारे में 5 घंटे बाद जारी किया गया था)।

पुष्टि करने के लिए आप v3.4.0 पर कर रहे हैं:

npm list enhanced-resolve 

कृपया v3.4.1 को बढ़ाया-संकल्प अद्यतन:

npm i enhanced-resolve 
+0

बढ़िया है, धन्यवाद। इसका हल मेरी समस्या – Hari

+3

यहाँ प्रासंगिक GitHub मुद्दे हैं: https://github.com/webpack/webpack-dev-server/issues/1005 और https://github.com/webpack/enhanced-resolve/issues/97 –

+0

'मेरे लिए NPM सूची बढ़ाया-संकल्प [email protected]/घर/उपयोगकर्ताओं/webgasmi/परियोजनाओं/training_front ├── [email protected] └─┬ [email protected] काम नहीं करता है └── बढ़ाया-संकल्प @ 3.4.0' – smarber