NPM Cache Clean - Force"
NPM Cache Clean - Force"
js and npm :
https://blog.teamtreehouse.com/install-node-js-npm-windows
or / and
https://mtyiu.github.io/csci4140-spring15/tutorials/5/install-nodejs-on-windows.pdf
Note : Choose to select node package manager while installing in the wizard in place of node.js runtime.
a)execute “npm init” from command prompt. First initialize to create package.jason file.
Note :press enter many times until you see a question asking for (y/n). type y.
c) if …..AppData/roaming/npm-cashe/log file has any error then execute “npm cache clean –force”
after that again execute ” npm install express –save” to install express.js.
or
https://www.robinwieruch.de/react-js-windows-setup/
a)https://www.codecademy.com/articles/react-setup-i
b)for react setup Babel :
https://www.codecademy.com/articles/react-setup-ii
c)for react setuo Webpack :
https://www.codecademy.com/articles/react-setup-iii
d)React setup HTML webpack plugin:
https://www.codecademy.com/articles/react-setup-iv
e)Deployment and running React app:
https://www.codecademy.com/articles/react-setup-v
Installation of Reactstrap,Bootstrap,react-transition-
group,react-popper etc.
9. https://www.npmjs.com/package/reactstrap
10. npm install --save bootstrap
Create-react-app runapp
cd runapp
npm start
18. https://medium.com/bcgdv-engineering/when-using-react-js-
webpack-dev-server-does-not-bundle-c2d340b0a3e8
or
https://www.topcoder.com/challenges/30058010
Install WEBPACK Bundler. WEBPACK bundler will bundle the dependencies & JSX
code together.
Type “npm install webpack --save” in command prompt.
Type “npm install webpack-dev-server --save” in command prompt.
Install Babel dependencies(In the same folder which you have created in previous
step)
Type “npm install babel-core --save” in command prompt.
Type “npm install babel-loader --save” in command prompt.
Type “npm install babel-preset-react --save” in command prompt.
Type “npm install babel-preset-es2016 --save” in command prompt.
Webpack.config.js
In order to run your first app you need to instruct webpack on which file to target as entry point.
Also, we will configure babel loader to use es2016 and react presets which we have installed in
previous steps.
webpack.config.js
const config = {
entry: "./index.js",
output: {
filename: "app.js"
},
module: {
loaders: [
test:/\.(js|jsx)$/,
loader: "babel-loader",
query: {
};
module.exports = config;
Update package.json's scripts section file with following script to start webpack. You must replace the test
script to start the webpack server. We don't need test script as we are not going to perform testing in this tutorial.
"scripts": {
"start":"webpack-dev-server --hot"
},
Run the app by executing command "npm start" in command prompt from runapp folder. You need
to look for the port number in the command prompt to know on which port the output has been
served.
Output:
The output which you will see in the browser is Hello World!