Category: Nodejs

node 0

path.join in nodejs

path.join() does two things : Joins all given path seg­ments together using the plat­form spe­cific sep­a­ra­tor as a delim­iter Nor­mal­izes the result­ing path path.join(‘src/’, ‘js/Router.jsx’); ‘src/js/Router.jsx’ on OSX and Linux ‘srcjsRouter.jsx’ on Win­dows Here, it…

npm list available versions of a package 1

npm list available versions of a package

As an exam­ple, to check which ver­sions of expressjs are avail­able on npm, you do the fol­low­ing npm info express ver­sions Of course, you can always grep for the ver­sion you are look­ing for npm…

node 0

Module build failed: ReferenceError: Promise is not defined

Have you run into the fol­low­ing errors while build­ing the app using web­pack ? ERROR in ./~/css-loader!./src/styles/app.css Mod­ule build failed: Ref­er­enceEr­ror: Promise is not defined Solu­tion : Upgrade the node ver­sion to the lat­est stable…