https://coolestguidesontheplanet.com/installing-node-js-on-macos/
install nodejs:
sudo apt-get install nodejs
init a directory for NPM (Node Package Manager) development:
npm init
this let you create basic package.json
setup. If you would like install something to be added to this package (flag -s
is ruccial for adding that) run:
npm install {your_favourite_library} -s
after running this command:
node_modules
directory will be created- dependency will be added to
package.json
you can for test remove wholde node_modules
and call again npm insall
inside the directory with package.json
and all the staff listed there will be installed.
to check what is currently installed:
npm ls
running dev server with content of 'src':
webpack-dev-server --content-base src
install webpack
npm install webpack -g
weback.config.js for config how webpack should work
if you face:
ERROR in Cannot find module 'babel-core'
install:
npm install babel-core babel-loader --save-dev -S