2017-01-18 11 views
11

की संपत्ति 'getLineAndCharacterOfPosition' पढ़ नहीं सकता है, मैं इस त्रुटि से फंस गया हूं, क्या कोई मेरी मदद कर सकता है? मैं सिर्फअपरिभाषित

$ ng serve                                            [19:46:01] 
** NG Live Development Server is running on http://localhost:4200. ** 
Hash: ed77e2590987da94e9d9                
Time: 4165ms 
chunk {0} scripts.bundle.js, scripts.bundle.map (scripts) 1.42 MB {4} [initial] [rendered] 
chunk {1} styles.bundle.js, styles.bundle.map (styles) 203 kB {4} [initial] [rendered] 
chunk {2} main.bundle.js, main.bundle.map (main) 576 bytes {3} [initial] [rendered] 
chunk {3} vendor.bundle.js, vendor.bundle.map (vendor) 234 kB [initial] [rendered] 
chunk {4} inline.bundle.js, inline.bundle.map (inline) 0 bytes [entry] [rendered] 

ERROR in Cannot read property 'getLineAndCharacterOfPosition' of undefined 

ERROR in ./src/main.ts 
Module build failed: Error: /Users/johntostring/Documents/web-workspace/ng2-qyweb/src/main.ts (3,40): Cannot find module '@angular/platform-browser-dynamic'.) 
/Users/johntostring/Documents/web-workspace/ng2-qyweb/src/main.ts (4,32): Cannot find module '@angular/core'.) 
    at _checkDiagnostics (/Users/johntostring/Documents/web-workspace/ng2-qyweb/node_modules/@ngtools/webpack/src/loader.js:145:15) 
    at /Users/johntostring/Documents/web-workspace/ng2-qyweb/node_modules/@ngtools/webpack/src/loader.js:172:17 
@ multi main 
webpack: bundle is now VALID. 

main.ts Angular2.4.3 enter image description here

app.module.ts enter image description here

+0

मैंने 'npm इंस्टॉल 'निष्पादित किया है। सभी निर्भरताओं को सफलतापूर्वक डाउनलोड किया गया है –

+1

कृपया अपना कोड प्रदान करें। – Mistalis

उत्तर

0

यह बहुत लंबा रहा है। मैंने node_modules को हटा दिया होगा और npm install फिर से

+0

यह गलत कॉन्फ़िगरेशन भी हो सकता है। मैं भूल गया –

2

करने के लिए उन्नत मैं इस थोड़ा छुपे त्रुटि शुरू हो रहा है जब मैं गलती से वापस जाने के लिए भूल गया मेरे घटकों में से एक में गेटर फ़ंक्शन से एक मान।

get gene() { 
    // return this._gene; 
} 
16

यह तब होता है जब आप अमान्य मान के साथ tsconfig.app.json या tsconfig.json संशोधित करते हैं।

संबंधित मुद्दे