npm start giving errors on tsc && concurrently - node.js

I've been trying to run npm start and I keep getting the following errors...
19 error node v4.2.0
20 error npm v3.10.5
21 error code ELIFECYCLE
22 error resume-editor#1.0.0 start: `tsc && concurrently "npm run tsc:w" "npm run lite" `
22 error Exit status 1
23 error Failed at the resume-editor#1.0.0 start script 'tsc && concurrently "npm run tsc:w" "npm run lite" '.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the resume-editor package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error tsc && concurrently "npm run tsc:w" "npm run lite"
23 error You can get information on how to open an issue for this project with:
23 error npm bugs resume-editor
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls resume-editor
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
I've tried the following:
npm install tsc (& the latest version)
npm install --save typings
typings install
npm install concurrently
npm install
npm run typings
npm run tsc (errors here)
Nothing seems to get npm start to work.
What's making this even more confusing is the fact that everything was running perfectly up until I exited out and tried to run node server.js.
Then once I tried to switch back to npm start I've been getting these errors ever since.
Package.json:
{
"name": "resume-editor",
"version": "1.0.0",
"scripts": {
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
"lite": "lite-server",
"postinstall": "typings install",
"tsc": "tsc",
"tsc:w": "tsc -w",
"typings": "typings"
},
"license": "ISC",
"dependencies": {
"#angular/common": "2.0.0-rc.4",
"#angular/compiler": "2.0.0-rc.4",
"#angular/core": "2.0.0-rc.4",
"#angular/forms": "0.2.0",
"#angular/http": "2.0.0-rc.4",
"#angular/platform-browser": "2.0.0-rc.4",
"#angular/platform-browser-dynamic": "2.0.0-rc.4",
"#angular/router": "3.0.0-beta.1",
"#angular/router-deprecated": "2.0.0-rc.2",
"#angular/upgrade": "2.0.0-rc.4",
"angular2-in-memory-web-api": "0.0.14",
"body-parser": "^1.4.3",
"bootstrap": "^3.3.6",
"concurrently": "^2.2.0",
"core-js": "^2.4.0",
"express": "^4.13.4",
"method-override": "^2.1.3",
"mongoose": "^4.4.12",
"morgan": "^1.1.1",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"systemjs": "0.19.27",
"tsc": "^1.20150623.0",
"typescript": "^1.8.10",
"typings": "^1.3.2",
"zone.js": "^0.6.12"
},
"devDependencies": {
"concurrently": "^2.0.0",
"lite-server": "^2.2.0",
"typescript": "^1.8.10",
"typings": "^1.0.4"
}
}
P.S: I have the latest versions of both node and npm.

you've install a package called TSC, it's probably colliding with the command line from the typescript package tsc. Try uninstalling the TSC package and re-running

You need to install typescript globally.
npm install -g typescript

Make sure there are no spaces in the path to the root of your project. Rename ancestor directories to have no white spaces.

Related

'npm install' does not work on a nodejs project in a plesk

I'm trying to deploy my nodejs project on my plesk server but something went wrong.
Even if everything works fine on localhost, I can not install npm on the plesk and I don't know why.
Here is my package.json :
{
"name": "node-mysql-boilerplate",
"version": "1.0.7",
"description": "node-mysql-boilerplate",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node app.js"
},
"dependencies": {
"#cosmjs/encoding": "^0.28.11",
"#elrondnetwork/elrond-core-js": "^2.1.0",
"#elrondnetwork/erdjs": "^10.2.5",
"#elrondnetwork/erdjs-network-providers": "^0.1.5",
"#elrondnetwork/erdjs-walletcore": "^1.0.0",
"ajv": "^5.5.2",
"artillery": "^2.0.0-16",
"axios": "^0.27.2",
"bcrypt": "^3.0.8",
"bcryptjs": "*",
"bech32-converting": "^1.0.9",
"body-parser": "*",
"cors": "*",
"express": "^4.18.1",
"flatted": "^3.2.6",
"fs": "^0.0.1-security",
"ipfs-api": "^26.1.2",
"ipfs-http-client": "^57.0.3",
"jsonwebtoken": "^8.5.1",
"mysql": "^2.18.1",
"node-schedule": "^1.3.0",
"nodemailer": "^6.7.5",
"nodemon": "^1.19.4",
"pm2": "^2.10.4",
"react": "^18.1.0",
"to-hex": "^0.0.18"
},
"author": "",
"license": "ISC"
}
Here is the error message on npm install process :
npm ERR! code 127
npm ERR! path /var/www/vhosts/apcom.app/elrond-api.apcom.app/node_modules/peer-id/node_modules/ursa-optional
npm ERR! command failed
npm ERR! command sh -c node rebuild.js
npm ERR! sh: 1: node: Permission denied
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-07-28T14_46_54_171Z-debug.log
My node version and npm version in the plesk
node -v # v16.13.0
npm -v # 8.1.0
Here is the link to the boilerplate I use for this nodejs project :
https://github.com/yug95/node-mysql
I have tried this, but nothing changes :
npm config set user 0
npm config set unsafe-perm true
and
rm -rf node_modules # Delete node_modules folder
npm install # Retry to install

NPM Installation Failed With Laravel 8

I want to run npm run dev command on my Laravel 8 project, but I get this error:
[webpack-cli] Error: Unknown option '--hide-modules'
[webpack-cli] Run 'webpack --help' to see available commands and options
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! # development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpa
ck.config.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the # development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User 1\AppData\Roaming\npm-cache\_logs\2021-07-03T05_59_56_150Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! # dev: `npm run development`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the # dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User 1\AppData\Roaming\npm-cache\_logs\2021-07-03T05_59_56_264Z-debug.log
My package.json goes like this:
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"#fortawesome/fontawesome-free": "^5.15.1",
"axios": "^0.21.1",
"bootstrap": "^4.5.2",
"jquery": "^3.5.1",
"laravel-mix": "^4.1.4",
"lodash": "^4.17.20",
"node-sass": "^4.14.1",
"popper.js": "^1.16.1",
"resolve-url-loader": "^2.3.1",
"sass": "^1.29.0",
"sass-loader": "^7.3.1",
"vue": "^2.6.12",
"vue-template-compiler": "^2.6.12",
"webpack": "^4.44.2",
"webpack-cli": "^4.7.2"
},
"dependencies": {
"#fancyapps/fancybox": "^3.5.7",
"#wiris/mathtype-tinymce5": "^7.24.1",
"bootstrap-fileinput": "^5.1.3",
"chosen-js": "^1.8.7",
"copy-to-clipboard": "^3.3.1",
"counterup2": "^1.0.4",
"croppie": "^2.6.5",
"font-awesome": "^4.7.0",
"highcharts": "^8.2.0",
"jquery-clock-timepicker": "^2.3.2",
"num2persian": "^3.2.2",
"production": "0.0.2",
"select2": "^4.0.13",
"simplebar": "^5.3.0",
"slick-carousel": "^1.8.1",
"sweetalert2": "^8.19.0",
"tinymce": "^5.5.1",
"tooltipster": "^4.2.8"
}
}
I tried deleting node_modules folder and again run the command npm install and npm run dev but didn't solve the issues.
At the very least, the latest version of Laravel 8 has a change to the scripts section in package.json to utilize the updated version of Laravel Mix.
Try this in your package.json.
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production"
},
"devDependencies": {
"#fancyapps/fancybox": "^3.5.7",
"#fortawesome/fontawesome-free": "^5.15.3",
"#wiris/mathtype-tinymce5": "^7.26.1",
"axios": "^0.21.1",
"bootstrap": "^5.0.2",
"bootstrap-fileinput": "^5.2.2",
"chosen-js": "^1.8.7",
"copy-to-clipboard": "^3.3.1",
"counterup2": "^1.0.4",
"croppie": "^2.6.5",
"highcharts": "^9.1.2",
"jquery": "^3.6.0",
"jquery-clock-timepicker": "^2.4.0",
"laravel-mix": "^6.0.25",
"lodash": "^4.17.21",
"node-sass": "^6.0.1",
"num2persian": "^3.2.2",
"popper.js": "^1.16.1",
"postcss-import": "^14.0.2",
"production": "0.0.2",
"resolve-url-loader": "^4.0.0",
"sass": "^1.35.1",
"sass-loader": "^12.1.0",
"select2": "^4.0.13",
"simplebar": "^5.3.4",
"slick-carousel": "^1.8.1",
"sweetalert2": "^11.0.18",
"tailwindcss": "^2.2.4",
"tinymce": "^5.8.2",
"tooltipster": "^4.2.8",
"vue": "^2.6.14",
"vue-template-compiler": "^2.6.14",
"webpack": "^5.42.0",
"webpack-cli": "^4.7.2"
}
}
Frist new install npm.
npm install
Please run the command.
npm i vue-loader
Now this command run.
npm run dev

Fresh Laravel Homestead 8.0.1: npm run dev fails to compile and npm ci fails to install. Something with cross-env?

I recently upgraded my Homestead from 6.3 to fresh Laravel Homestead 8.1.
I ssh'ed into the VM as usual to compile assets in my Laravel project via npm run dev and it started failing.
I was getting issue that Node Sass does not yet support your current environment (similar to this) but running:
sudo npm rebuild node-sass and npm uninstall --save node-sass and npm install --save node-sass didn't help.
When I completely remove node_modules via rm -rf node_modules or do npm ci it install stuff and fails at the end with:
No idea how to fix this. My node and npm versions are below:
node -v gives v12.7.0
npm -v gives 6.10.2
package.json is:
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"test": "cross-env NODE_ENV=test jest",
"tdd": "npm run test -- --watch --notify"
},
"devDependencies": {
"#coreui/coreui": "^2.0.4",
"#fortawesome/fontawesome-svg-core": "^1.2.2",
"#fortawesome/free-brands-svg-icons": "^5.2.0",
"#fortawesome/free-regular-svg-icons": "^5.2.0",
"#fortawesome/free-solid-svg-icons": "^5.2.0",
"#vue/test-utils": "^1.0.0-beta.10",
"axios": "^0.18",
"babel-jest": "^22.1.0",
"bootstrap": "^4.0.0",
"cross-env": "^5.1",
"jest": "^22.1.4",
"jest-vue-preprocessor": "^1.3.1",
"jquery": "^3.2",
"laravel-mix": "^2.0",
"lodash": "^4.17.5",
"pace": "github:HubSpot/pace#v1.0.2",
"perfect-scrollbar": "^1.4.0",
"popper.js": "^1.12.4",
"sweetalert2": "^7.0.7",
"vue": "^2.5.7"
},
"jest": {
"testURL": "http://localhost",
"roots": [
"<rootDir>/tests/Javascript/"
],
"moduleNameMapper": {
"^vue$": "vue/dist/vue.common.js"
},
"moduleFileExtensions": [
"js",
"vue"
],
"transform": {
"^.+\\.js$": "<rootDir>/node_modules/babel-jest",
".*\\.(vue)$": "<rootDir>/node_modules/jest-vue-preprocessor"
}
},
"dependencies": {
"bootstrap-datepicker": "^1.8.0",
"clipboard": "^2.0.4",
"datatables.net": "^1.10.19",
"datatables.net-bs4": "^1.10.19",
"datatables.net-scroller": "^2.0.0",
"debounce": "^1.2.0",
"jquery-datatables-checkboxes": "^1.2.11",
"owl.carousel": "^2.3.4",
"select2": "^4.0.6-rc.1"
}
}
Can somebody give me any hint? I'm happy to provide additional output from any logs if needed. I'm blocked by this one.
Full reset did the job:
rm -rf node_modules
rm package-lock.json
npm cache clear --force
npm install
then
npm run dev
I committed new package-lock.json into the repository. Can somebody at least explain what was the culprit?

Running Existing Angular Project locally

I am very new to Angular, I am trying to run an existing project of Angular on my machine. I have done a lot of tests and followed a lot of articles. But cannot run my project.
I have the project files like this:
I installed the nodejs on my system.
And followed the following instructions as per an article:
change directory to our repo
cd myproject
installing Cli according to project readme file.
npm install -g #angular/cli#1.3.2
install the repo with npm
npm install
install TypeScript typings
npm run typings-install
-- Gives error: npm ERR! missing script: typings-install
Then I try the following:
npm install --global
For following:
webpack (npm install --global webpack)
webpack-dev-server (npm install --global webpack-dev-server)
karma (npm install --global karma-cli)
protractor (npm install --global protractor)
typings (npm install --global typings)
typescript (npm install --global typescript)
start the server
npm start
-- Gives multiple error messages:
Such as:
npm ERR! code ELIFECYCLE
-- For this I tried "npm cache clean" and then deleted "node_modules" and then installed packages again using: "npm install --save"
Then tried again: npm start it gave me same error "npm ERR! code ELIFECYCLE"
Also, this error message:
Cannot find module 'webpack/lib/node/NodeTemplatePlugin'
For this, I tried "npm uninstall -g webpack"
and then: npm install --save-dev webpack webpack-cli html-webpack-plugin webpack-dev-server webpack-dev-middleware from this: Error: Cannot find module 'webpack/lib/node/NodeTemplatePlugin'
Tried running it again:
this time it gave me following error:
ERROR in ./node_modules/raw-loader!./node_modules/#angular/cli/node_modules/post
css-loader/lib??embedded!./node_modules/sass-loader/lib/loader.js??ref--8-3!./sr
c/styles.scss
Module build failed: Error: Cannot find module 'node-sass'
For this "Cannot find module 'node-sass'" I did the search again:
and found this command: npm install node-sass
i tried it and then tried starting again
Now I received ERROR in No NgModule metadata found for 'AppModule'.
And for this I tried the following from git cli issues 8798
remove the node_modules folder
rm -rf node_modules
remove the webpack
npm remove webpack
clean npm cahe
npm cache clean --force
install the latest version of angular cli
npm install --save-dev #angular/cli#latest
install the dependencies
npm install
now it's just testing
npm start our ng serve
Now it start giving me: Local workspace file ('angular.json') could not be found and wont work at all.
To resolve this: I did: ng update #angular/cli --migrate-only --from=1.7.4
Which remove the error: "Local workspace file ('angular.json') could not be found" but now it gives me error
ERROR in src/app/web-player/albums/album-context-menu/album-context-menu.compon
nt.ts(13,14): error TS2515: Non-abstract class 'AlbumContextMenuComponent' does
not implement inherited abstract member 'getAllTracks' from class 'ContextMenuC
mponent<Album>'.
src/app/web-player/artists/artist-context-menu/artist-context-menu.component.ts
13,14): error TS2515: Non-abstract class 'ArtistContextMenuComponent' does not
mplement inherited abstract member 'getAllTracks' from class 'ContextMenuCompon
nt<Artist>'.
src/app/web-player/context-menu/context-menu.component.ts(58,34): error TS2304:
Cannot find name 'TrackList'.
src/app/web-player/playlists/playlist-context-menu/playlist-context-menu.compon
nt.ts(15,14): error TS2515: Non-abstract class 'PlaylistContextMenuComponent' d
es not implement inherited abstract member 'getAllTracks' from class 'ContextMe
uComponent<Playlist>'.
What am i missing here? I tried a lot of articles from 3 days but cannot run it.
Also, I see different types of Warning and messages.
Read Me file in project:
# Client
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.3.2.
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
Before running the tests make sure you are serving the app via `ng serve`.
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
Package.json file:
{
"name": "client",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json --host 0.0.0.0",
"build": "ng build --prod --sourcemaps --build-optimizer",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"#angular/animations": "^5.1.2",
"#angular/common": "^5.1.2",
"#angular/compiler": "^5.1.2",
"#angular/core": "^5.1.2",
"#angular/forms": "^5.1.2",
"#angular/http": "^5.1.2",
"#angular/platform-browser": "^5.1.2",
"#angular/platform-browser-dynamic": "^5.1.2",
"#angular/router": "^5.1.2",
"bootstrap": "^4.0.0-beta",
"chart.js": "^2.7.0",
"copy-to-clipboard": "^3.0.8",
"core-js": "^2.5.1",
"hammerjs": "^2.0.8",
"moment": "^2.18.1",
"ng-lazyload-image": "^3.3.3",
"ngx-color-picker": "^4.3.4",
"normalize.css": "^7.0.0",
"perfect-scrollbar": "^0.8.1",
"popper.js": "^1.12.5",
"raven-js": "^3.18.1",
"rxjs": "^5.4.2",
"svg4everybody": "^2.1.4",
"tooltip.js": "^1.1.5",
"zone.js": "^0.8.18"
},
"devDependencies": {
"#angular/cli": "^1.6.2",
"#angular/compiler-cli": "^5.1.2",
"#angular/language-service": "^5.1.2",
"#types/hammerjs": "^2.0.35",
"#types/jasmine": "~2.5.53",
"#types/jasminewd2": "^2.0.3",
"#types/node": "~6.0.60",
"#types/popper.js": "^1.10.1",
"#types/youtube": "0.0.31",
"#types/clipboard": "^1.5.35",
"cheerio": "^1.0.0-rc.2",
"codelyzer": "~3.1.1",
"gulp": "^3.9.1",
"gulp-clean": "^0.3.2",
"gulp-filter": "^5.0.0",
"gulp-rename": "^1.2.2",
"gulp-svgmin": "^1.2.3",
"gulp-svgstore": "^6.1.0",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "^1.7.1",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"material-design-icons": "^3.0.1",
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.4.2",
"webpack-bundle-analyzer": "^2.9.0"
}
}
Run the following commands
npm uninstall -g #angular/cli
npm cache verify
npm install -g #angular/cli#next
npm update
Then
ng serve
I hope it works now. Comment if u face any error while.
That should be much easier...
Take your project files as is
Run npm install
Since you have the package.json file, it will read all dependencies and install them.
Then run npm audit fix if needed (the terminal will tell you that).
try ng serve --open
it will compile your project and directly open in browser
rename the file .angular-cli.json to angular.json and re run the ng serve --open command.
Change the path of the directory in your local
cd my-repo
npm install
ng serve or ng serve --open
You will find the Localhost then.
To clean the cache:
npm cache clean
I also had need to setup existing angular project.
*cli version as per your package.json file
npm install -g #angular/cli#1.3.2
Then
npm install
Then
ng serve
I have tested, it is working here.

How to define scripts for npm command?

I am using npm+webpack to manage a react web application. And I want to define a few command for npm in order to run some webpack command. Below is the two command scripts I defined in package.json file.
"scripts": {
"start": "webpack-dev-server --host 0.0.0.0",
"build": "NODE_ENV=production webpack --config ./webpack.config.js --progress --profile --colors"
},
As you can see, there are two commands 'start' and 'build'. When I run npm start it will run webpack-dev-server --host 0.0.0.0 to launch a web server.
But when I run npm build, it doesn't run the configured command and simply returns without any output. I wander how to define a script command for npm to use. Below is my whole package.json file:
{
"name": "demo",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "webpack-dev-server --host 0.0.0.0",
"build": "NODE_ENV=production webpack --config ./webpack.config.js --progress --profile --colors"
},
"author": "",
"license": "ISC",
"devDependencies": {
"babel-core": "^6.9.0",
"babel-loader": "^6.2.4",
"compression-webpack-plugin": "^0.3.1",
"css-loader": "^0.23.1",
"less": "^2.7.1",
"less-loader": "^2.2.3",
"npm-install-webpack-plugin": "^3.1.3",
"style-loader": "^0.13.1",
"svg-sprite-loader": "0.0.26",
"webpack": "^1.13.1",
"webpack-dev-server": "^1.14.1",
"webpack-shell-plugin": "^0.4.2"
},
"dependencies": {
"actions": "^1.3.0",
"axios": "^0.12.0",
"babel-preset-stage-2": "^6.11.0",
"cdnjs": "^0.3.2",
"components": "^0.1.0",
"containers": "0.0.1",
"extract-text-webpack-plugin": "^1.0.1",
"features": "^0.1.0",
"file-loader": "^0.8.5",
"fo": "^0.1.1",
"jshint": "^2.9.2",
"jshint-loader": "^0.8.3",
"leaflet": "^0.7.7",
"material-ui": "^0.15.2",
"moment": "^2.13.0",
"normalize.css": "^3.0.2",
"nuka-carousel": "^2.0.0",
"public": "^0.1.2",
"query-string": "^4.2.2",
"react": "^15.1.0",
"react-addons-css-transition-group": "^15.1.0",
"react-addons-shallow-compare": "^15.1.0",
"react-alert": "^1.0.14",
"react-button": "^1.2.1",
"react-cookie": "^0.4.7",
"react-date-picker": "^5.3.9",
"react-datepicker": "^0.27.0",
"react-dom": "^15.0.2",
"react-infinite-calendar": "^1.1.14",
"react-redux": "^4.4.5",
"react-router": "^2.4.1",
"react-router-redux": "^4.0.5",
"react-select": "^1.0.0-beta13",
"react-spinkit": "^1.1.8",
"react-tap-event-plugin": "^1.0.0",
"react-tappable": "^0.8.1",
"redux": "^3.5.2",
"redux-thunk": "^2.1.0",
"sha1": "^1.1.1",
"source-map-loader": "^0.1.5",
"src": "^1.1.2",
"style": "0.0.3",
"url-loader": "^0.5.7",
"utils": "^0.3.1"
}
}
You can use npm run-script <script-name> to run arbitrary scripts. In your case, npm run-script build.
From the npm documentation, The npm <script-name> syntax is only supported for a specific number of predetermined scripts such as start.
npm supports the "scripts" property of the package.json script, for
the following scripts:
prepublish: Run BEFORE the package is published. (Also run on local npm install without any arguments.)
publish, postpublish: Run AFTER the package is published.
preinstall: Run BEFORE the package is installed
install, postinstall: Run AFTER the package is installed.
preuninstall, uninstall: Run BEFORE the package is uninstalled.
postuninstall: Run AFTER the package is uninstalled.
preversion, version: Run BEFORE bump the package version.
postversion: Run AFTER bump the package version.
pretest, test, posttest: Run by the npm test command.
prestop, stop, poststop: Run by the npm stop command.
prestart, start, poststart: Run by the npm start command.
prerestart, restart, postrestart: Run by the npm restart command. Note: npm restart will run the stop and start scripts if no restart script is provided.
Additionally, arbitrary scripts can be executed by running npm run-script <pkg> <stage>. Pre and post commands with matching names
will be run for those as well (e.g. premyscript, myscript,
postmyscript).
As well, you can use npm run <script-name> as a shorthand.
You can define an npm script just like how you have it here:
"scripts": {
"start": "webpack-dev-server --host 0.0.0.0",
"build": "NODE_ENV=production webpack --config ./webpack.config.js --progress --profile --colors"
},
To run the build command enter:
$ npm run build
you need to use command npm run build

Resources