question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm start failed with error TS2305: Module '"{folder path}/node_modules/@angular/core/index"' has no exported member 'Component'.

See original GitHub issue

Hi I am facing an issue while starting angular\quickstart . if i try after deleting app folder, then npm start is running the lite-server.

following are the version details. node -v = v6.3.1 npm -v = 3.10.5 tsc -v Version 1.8.10 typings -v 1.3.2

E:\Work\angularjs\1ng2-myproj1>npm start

angular2-quickstart@1.0.0 start E:\Work\angularjs\1ng2-myproj1 tsc && concurrently “tsc -w” “lite-server”

app/app.component.ts(1,10): error TS2305: Module ‘“E:/Work/angularjs/1ng2-myproj1/node_modules/@angular/core/index”’ has no exported member ‘Component’. node_modules/@angular/core/index.d.ts(13,15): error TS2307: Cannot find module ‘./src/metadata’. node_modules/@angular/core/index.d.ts(14,15): error TS2307: Cannot find module ‘./src/util’. node_modules/@angular/core/index.d.ts(15,15): error TS2307: Cannot find module ‘./src/di’. …

other observations There is index.js file is available in “node_modules/@angular/core/index”. src folder is NOT available in “node_modules/@angular/core/” src folder is available “node_modules/@angular/core/esm”

E:\Work\angularjs\1ng2-myproj1\npm-debug.log 0 info it worked if it ends with ok 1 verbose cli [ ‘C:\Program Files\nodejs\node.exe’, 1 verbose cli ‘C:\Users\jobyj\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js’, 1 verbose cli ‘start’ ] 2 info using npm@3.10.5 3 info using node@v6.3.1 4 verbose run-script [ ‘prestart’, ‘start’, ‘poststart’ ] 5 info lifecycle angular2-quickstart@1.0.0~prestart: angular2-quickstart@1.0.0 6 silly lifecycle angular2-quickstart@1.0.0~prestart: no script for prestart, continuing 7 info lifecycle angular2-quickstart@1.0.0~start: angular2-quickstart@1.0.0 8 verbose lifecycle angular2-quickstart@1.0.0~start: unsafe-perm in lifecycle true 9 verbose lifecycle angular2-quickstart@1.0.0~start: PATH: C:\Users\jobyj\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;E:\Work\angularjs\1ng2-myproj1\node_modules.bin;C:\Program Files\nodejs;C:\Users\jobyj\AppData\Roaming\npm;C:\Program Files\nodejs;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Users\jobyj.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Users\jobyj\AppData\Roaming\npm 10 verbose lifecycle angular2-quickstart@1.0.0~start: CWD: E:\Work\angularjs\1ng2-myproj1 11 silly lifecycle angular2-quickstart@1.0.0~start: Args: [ ‘/d /s /c’, 'tsc && concurrently “tsc -w” “lite-server” ’ ] 12 silly lifecycle angular2-quickstart@1.0.0~start: Returned: code: 2 signal: null 13 info lifecycle angular2-quickstart@1.0.0~start: Failed to exec start script 14 verbose stack Error: angular2-quickstart@1.0.0 start: tsc && concurrently "tsc -w" "lite-server" 14 verbose stack Exit status 2 14 verbose stack at EventEmitter.<anonymous> (C:\Users\jobyj\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:242:16) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at EventEmitter.emit (events.js:191:7) 14 verbose stack at ChildProcess.<anonymous> (C:\Users\jobyj\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at ChildProcess.emit (events.js:191:7) 14 verbose stack at maybeClose (internal/child_process.js:852:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5) 15 verbose pkgid angular2-quickstart@1.0.0 16 verbose cwd E:\Work\angularjs\1ng2-myproj1 17 error Windows_NT 10.0.10586 18 error argv “C:\Program Files\nodejs\node.exe” “C:\Users\jobyj\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js” “start” 19 error node v6.3.1 20 error npm v3.10.5 21 error code ELIFECYCLE 22 error angular2-quickstart@1.0.0 start: tsc && concurrently "tsc -w" "lite-server" 22 error Exit status 2 23 error Failed at the angular2-quickstart@1.0.0 start script 'tsc && concurrently “tsc -w” “lite-server” '. 23 error Make sure you have the latest version of node.js and npm installed. 23 error If you do, this is most likely a problem with the angular2-quickstart package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error tsc && concurrently “tsc -w” “lite-server” 23 error You can get information on how to open an issue for this project with: 23 error npm bugs angular2-quickstart 23 error Or if that isn’t available, you can get their info via: 23 error npm owner ls angular2-quickstart 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

13reactions
dmotornycommented, May 4, 2018

Try to install:

"rxjs": "^6.0.0",
"rxjs-compat": "^6.0.0"

I had the same errors by migration from Angular 5.2.10 to 6.0.0 and It has solved the problem. Here you’ll find more information: https://github.com/ReactiveX/rxjs/blob/master/MIGRATION.md Good Luck!)

5reactions
filipesilvacommented, Aug 10, 2016

Hm. Your error seems to indicate some problem during the npm install. It’s basically saying that one of your libs is broken (in this case, angular itself).

Can you delete node_modules and do npm install again? If that’s the problem, it should fix it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

error TS2305: Module "/node_modules/rxjs/Rx" has no ...
I just need to build and run the project. i have tried replace rxjs folder under node modules from a running a project....
Read more >
scripts - npm Docs
then you could run npm start to execute the bar script, which is exported into the node_modules/.bin directory on npm install . package.json...
Read more >
[Solved] Error TS2305: Module '”{FilePath}/app.component ...
component ”' Has No Exported Member 'ErrorseaFilter' or similar error in Angular with different class name, you are at the perfect place to...
Read more >
m getting a &#38;#039;has no exported member Conf
ERROR in node_modules/ng-uikit-pro-standard/lib/free/modals/modal.directive.d.ts:6:10 - error TS2305: Module '"../../../../@angular/cdk/a11y"' has no ...
Read more >
Error Module "C:\..." has no exported member 'NgModule' in ...
My steps include: Creating SharePoint App; Creating tsconfig.json; Executing npm command: npm install angular2 systemjs es6-promise es6-shim ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found