verekia / js-stack-walkthrough

Code for each chapter of the JavaScript-Stack-from-Scratch tutorial.
MIT License
30 stars 58 forks source link

In chapter 06 the pm logs 'Cannot find module' error #1

Closed xaviertung closed 7 years ago

xaviertung commented 7 years ago

@verekia When running the command yarn prod:start the PM logs error are as follows:

/Users/xaviertung/.pm2/logs/server-error-0.log last 15 lines:
0|server   |     at Object.Module._extensions..js (module.js:580:10)
0|server   |     at Module.load (module.js:488:32)
0|server   |     at tryModuleLoad (module.js:447:12)
0|server   |     at Function.Module._load (module.js:439:3)
0|server   | Error: Cannot find module './component/nav.jsx'
0|server   |     at Function.Module._resolveFilename (module.js:470:15)
0|server   |     at Function.Module._load (module.js:418:25)
0|server   |     at Module.require (module.js:498:17)
0|server   |     at require (internal/module.js:20:19)
0|server   |     at Object.<anonymous> (/Users/xaviertung/WebstormProjects/js-stack-from-scratch-demo/lib/shared/app.js:15:12)
0|server   |     at Module._compile (module.js:571:32)
0|server   |     at Object.Module._extensions..js (module.js:580:10)
0|server   |     at Module.load (module.js:488:32)
0|server   |     at tryModuleLoad (module.js:447:12)
0|server   |     at Function.Module._load (module.js:439:3)

But the server started properly, what happend? Thx!

xaviertung commented 7 years ago

I'm sorry for my own mistake, it's the reson that the problem is caused by historical error, and the error will be displayed every running time.