loktar00 / react-lazy-load

React component that renders children elements when they enter the viewport.
MIT License
979 stars 166 forks source link

Error in your basic example. #93

Closed Vasikaran closed 2 years ago

Vasikaran commented 7 years ago

I can't run your basic example. When I try to start the server, suddenly throw the Cannot find module babel-core/register error displayed.

danbrellis commented 7 years ago

I also get this error. Any suggestions?

FYI the full error:

$ npm start

> react-lazy-load-basic-example@0.0.0 start C:\Users\danbr\Downloads\react-lazy-load\examples\basic > node -r 'babel-core/register' ./initializers/server/index.js

module.js:471 throw err; ^

Error: Cannot find module ''babel-core/register'' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at module.js:660:12 at Array.forEach (native) at Function.Module._preloadModules (module.js:659:12) at preloadModules (bootstrap_node.js:365:38) at startup (bootstrap_node.js:148:9) at bootstrap_node.js:509:3

npm ERR! Windows_NT 10.0.14393 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program >Files\nodejs\node_modules\npm\bin\npm-cli.js" "start" npm ERR! node v6.9.5 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! react-lazy-load-basic-example@0.0.0 start: node -r 'babel-core/register' >./initializers/server/index.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the react-lazy-load-basic-example@0.0.0 start script 'node -r 'babel-core/register' >./initializers/server/index.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 react-lazy-load-basic-example package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node -r 'babel-core/register' ./initializers/server/index.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs react-lazy-load-basic-example npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls react-lazy-load-basic-example npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! C:\Users\danbr\Downloads\react-lazy-load\examples\basic\npm-debug.log

and the debug log attached. npm-debug.txt

gl0gl0 commented 7 years ago

I'm having the same error as well

cokafor571 commented 7 years ago

Me as well, I will mess around with the setup and see if I can get it to work

willymai commented 7 years ago

just remove single quotes in package.json May it help you guys ✌️

loktar00 commented 2 years ago

Newest version being worked on fortunately solves the issues with the example.