Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build and run issue #3

Open
nitank opened this issue Sep 13, 2017 · 7 comments
Open

build and run issue #3

nitank opened this issue Sep 13, 2017 · 7 comments

Comments

@nitank
Copy link

nitank commented Sep 13, 2017

using node version - v7.10.0
1 - simply clone the repo
2 - npm install
3 - ng build --prod (got error)

Hash: f90db9fff55c2f7b14f0
Time: 7456ms
chunk {0} polyfills.9131b05cdf777ae5f31c.bundle.js (polyfills) 183 kB {4} [initial] [rendered]
chunk {1} main.7301cc9a92fdada7b353.bundle.js (main) 668 bytes {3} [initial] [rendered]
chunk {2} styles.d41d8cd98f00b204e980.bundle.css (styles) 69 bytes {4} [initial] [rendered]
chunk {3} vendor.71ee308c9492a966817a.bundle.js (vendor) 851 kB [initial] [rendered]
chunk {4} inline.9b87052ab4a807225072.bundle.js (inline) 0 bytes [entry] [rendered]

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '/home/nitank/projects/mean-angular4-chat-app/src'
@ ./src/main.ts 4:0-74
@ multi ./src/main.ts

4 - if still hits 'npm start' , got -

[email protected] start /home/nitank/projects/mean-angular4-chat-app
node ./bin/www

(node:12498) DeprecationWarning: open() is deprecated in mongoose >= 4.11.0, use openUri() instead, or set the useMongoClient option if using connect() or createConnection(). See http://mongoosejs.com/docs/connections.html#use-mongo-client
events.js:163
throw er; // Unhandled 'error' event
^

Error: listen EADDRINUSE :::4000
at Object.exports._errnoException (util.js:1050:11)
at exports._exceptionWithHostPort (util.js:1073:20)
at Server.setupListenHandle [as _listen2] (net.js:1259:14)
at listenInCluster (net.js:1307:12)
at Server.listen (net.js:1406:7)
at Object. (/home/nitank/projects/mean-angular4-chat-app/routes/chat.js:9:8)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/home/nitank/projects/mean-angular4-chat-app/app.js:14:12)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)

npm ERR! Linux 4.4.0-93-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node ./bin/www
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node ./bin/www'.
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 mean-chat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./bin/www
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs mean-chat
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls mean-chat
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/nitank/.npm/_logs/2017-09-13T19_17_41_938Z-debug.log

@didinj
Copy link
Owner

didinj commented Sep 14, 2017

Try downgrade your Node.js, I'm using recommended version 6.x.x

@nitank
Copy link
Author

nitank commented Sep 14, 2017

same issue with v6.0.0 and v6.9.5

@didinj
Copy link
Owner

didinj commented Sep 15, 2017

After the downgrade, make sure you have to remove node_modules and run npm-install again.

@nitank
Copy link
Author

nitank commented Sep 15, 2017

Even i cloned again after downgrade 2 times with fresh npm install.

@malaotou
Copy link

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'C:\Ang2\mean-angular4-chat-app\src'
@ ./src/main.ts 4:0-74
@ multi ./src/main.ts

@Marshal27
Copy link

ng build --env=prod --output-hashing none
got the fix from this thread.
willsoto/ng-chartist#94

for the EADDRINUSE :::4000
close down all terminals and reset your network interface to free up port 4000

@ravindranath143
Copy link

ravindranath143 commented Oct 29, 2018

npm install [email protected]

Did the trick for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants