npm install failing in azure on jspm step - azure

ASP.NET app with prepublish step of "npm install" (in project.json). This is failing on the Azure deploy due to not having jspm (which should be installed by npm install). The peer dependencies are also throwing a warning, despite being listed in the package.json. npm install will work locally. Below are the Azure deployment logs and my .json file settings.
project.json
{
"version": "1.0.0-*",
"dependencies": {
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
"Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
"Microsoft.Dnx.Runtime": "1.0.0-rc1-final"
},
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel"
},
"frameworks": {
"dnx451": { },
"dnxcore50": { }
},
"exclude": [
"wwwroot",
"node_modules"
],
"publishExclude": [
"**.user",
"**.vspscc"
],
"scripts": {
"prepublish": [ "npm install", "jspm install -y", "gulp copy-jspm", "gulp" ]
}
}
package.json
{
"name": "angular2-aspnetcore-starter",
"version": "1.0.0",
"description": "Angular2 with Asp.net Core starter kit.",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Ryan Langton",
"license": "ISC",
"jspm": {
"directories": {
"packages": "wwwroot/jspm_packages"
},
"configFile": "wwwroot/config.js",
"dependencies": {
"angular2": "npm:angular2#^2.0.0-beta.1",
"angular2-polyfill": "npm:angular2-polyfill#^0.0.1",
"es6-shim": "github:es-shims/es6-shim#^0.34.1",
"reflect-metadata": "npm:reflect-metadata#^0.1.3",
"zonejs": "npm:zone.js#^0.5.10"
},
"devDependencies": {
"babel": "npm:babel-core#^5.8.24",
"babel-runtime": "npm:babel-runtime#^5.8.24",
"core-js": "npm:core-js#^1.1.4"
}
},
"devDependencies": {
"angular2": "^2.0.0-beta.1",
"del": "^2.2.0",
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.13",
"gulp": "~3.9.0",
"gulp-typescript": "~2.10.0",
"gulp-watch": "~4.3.5",
"jspm": "^0.16.24",
"reflect-metadata": "^0.1.2",
"rxjs": "^5.0.0-beta.0",
"zone.js": "^0.5.10"
}
}
Azure activity logs
....
Writing lock file D:\home\site\repository\Angular2AspNetCoreStarter\project.lock.json
Restore complete, 85647ms elapsed
Feeds used:
https://api.nuget.org/v3-flatcontainer/
Installed:
206 package(s) to D:\local\UserProfile\.dnx\packages
Microsoft .NET Development Utility Clr-x86-1.0.0-rc1-16202
Executing script 'prepublish' in project.json
angular2-aspnetcore-starter#1.0.0 D:\home\site\repository\Angular2AspNetCoreStarter
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
├── reflect-metadata#0.1.2
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.6
└── rxjs#5.0.0-beta.0
npm WARN angular2-aspnetcore-starter#1.0.0 No repository field.
'jspm' is not recognized as an internal or external command,
operable program or batch file.
The 'prepublish' script failed with status code 1.
An error has occurred during web site deployment.

Related

Laravel/NodeJS - npm ERR! Missing script: "watch"

I've upgraded to Laravel 9 recently.
Here is my package.json:
{
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"#vitejs/plugin-vue": "^3.0.3",
"autoprefixer": "^10.4.8",
"axios": "^0.21",
"laravel-mix": "^6.0.6",
"laravel-vite-plugin": "^0.6.0",
"lodash": "^4.17.19",
"postcss": "^8.4.16",
"tailwindcss": "^3.1.8",
"vite": "^3.0.9"
},
"dependencies": {
"alpinejs": "^3.8.1",
"laravel-echo": "^1.11.3",
"pusher-js": "^7.0.3"
},
"name": "beastburst-website",
"description": "<p align=\"center\"><img src=\"https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg\" width=\"400\"></p>",
"version": "1.0.0",
"main": "tailwind.config.js",
"directories": {
"test": "tests"
},
"repository": {
"type": "git",
"url": "https://code.scarsgaming.net/BeastBurst/BeastBurst-Website.git"
},
"keywords": [],
"author": "",
"license": "ISC"
}
When I run npm run watch I get the following error:
npm ERR! Missing script: "watch"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/venelin/.npm/_logs/2022-08-31T11_40_11_910Z-debug-0.log
Any idea why and how can I fix that?
The default bundler for Laravel now is Vite as you can clearly see from your package.json
If you do not want to use Vite, use this guide to switch to mix
I should also mention that Vite is much faster that mix.
try npm run dev it will work like npm run watch that is because Laravel 9 now uses Vite.

When trying to publish the extension, receive error: Part URI is not valid per rules defined in the Open Packaging Conventions specification

I'm trying to publish an extension by vsce, I logged in with the user access token,
after the build its create a file named 'NadavShaked.my-first-extension v1.0.968.vsix'
I'm trying to publish the extension to the marketplace by this command 'vsce publish' and received this error:
this is the guide I used
https://code.visualstudio.com/api/working-with-extensions/publishing-extension
this is my azure-devops-extension.json file:
{
"manifestVersion": 1,
"id": "my-first-extension",
"publisher": "NadavShaked",
"version": "1.0.968",
"name": "my-first-extension",
"description": "Azure DevOps Extension",
"categories": [
"Azure Repos",
"Azure Boards",
"Azure Pipelines",
"Azure Test Plans",
"Azure Artifacts"
],
"targets": [ {
"id": "Microsoft.VisualStudio.Services"
} ],
"icons": {
"default": "logo.png"
},
"content": {
"details": {
"path": "overview.md"
}
},
"files": [ {
"path": "dist",
"addressable": true
} ]
}
this is my package.json file:
{
"id": "my-first-extension",
"name": "my-first-extension",
"publisher": "NadavShaked",
"version": "1.0.968",
"description": "Azure DevOps Extension",
"keywords": [
"extensions",
"Azure DevOps",
"Visual Studio Team Services"
],
"engines": {
"vscode": "^1.8.0"
},
"license": "MIT",
"repository": {
"type": "git",
"url": ""
},
"scripts": {
"clean": "rimraf ./dist",
"compile": "npm run clean && npm run test && webpack --mode production",
"compile:dev": "npm run clean && npm run test && webpack --mode development",
"build": "npm run compile",
"build:dev": "npm run compile:dev && npm run postbuild",
"postbuild": "npm run package-extension -- --rev-version",
"package-extension": "tfx extension create --manifest-globs azure-devops-extension.json src/Samples/**/*.json",
"publish-extension": "tfx extension publish --manifest-globs azure-devops-extension.json src/Samples/**/*.json",
"test": "set TEST_REPORT_FILENAME=test-results.xml && jest --verbose"
},
"dependencies": {
"#fluentui/react": "^8.36.3",
"azure-devops-extension-api": "~1.157.0",
"azure-devops-extension-sdk": "~2.0.11",
"azure-devops-ui": "~2.164.0",
"react": "~16.13.1",
"react-dom": "~16.13.1"
},
"devDependencies": {
"#testing-library/jest-dom": "^5.11.0",
"#testing-library/react": "^10.4.4",
"#types/jest": "^26.0.3",
"#types/react": "~16.8.2",
"#types/react-dom": "~16.8.0",
"copy-webpack-plugin": "^7.0.0",
"base64-inline-loader": "~1.1.1",
"css-loader": "~1.0.0",
"jest": "^26.1.0",
"jest-junit-reporter": "^1.1.0",
"node-sass": "^5.0.0",
"rimraf": "~2.6.2",
"sass-loader": "~10.0.5",
"style-loader": "~0.23.1",
"tfx-cli": "^0.6.3",
"ts-jest": "^26.1.1",
"ts-loader": "~5.2.2",
"typescript": "^3.9.6",
"webpack": "^5.23.0",
"webpack-cli": "^4.5.0"
},
"jest": {
"transform": {
"^.+\\.(js|ts|tsx|jsx)$": "ts-jest"
},
"transformIgnorePatterns": [
"node_modules/(?!(react-native|azure-devops-ui|azure-devops-extension-sdk)/)"
],
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/src/__mocks__/fileMock.js",
"\\.(css|less|scss)$": "<rootDir>/src/__mocks__/styleMock.js"
},
"preset": "ts-jest/presets/js-with-babel",
"testResultsProcessor": "./node_modules/jest-junit-reporter",
"collectCoverage": true,
"coverageReporters": [
"json",
"html",
"cobertura"
],
"globals": {
"ts-jest": {
"tsconfig": "tsconfig.test.json"
}
}
}
}
I upload the project to git my repo:
https://github.com/NadavShaked/vstsExtension/tree/master/vsts%20extension
this is the extension by run: 'vsce package'
https://easyupload.io/skwmep
this is the extension by run: 'npm run build'
https://easyupload.io/kzopux
I prefer to publish the second extension (npm run build command)
vsce is not the right command to publish to Azure devops.
In my package.json, I used npm run publish-extension or better npm run package-extension and published it by hand.

Subpackage is not included in my npm module

I have an npm module called 'ldap-pool'. This package depends on 'ldapjs' and also '#types/ldapjs', but for some reason when I install 'ldap-pool' into another project, the '#types/ldapjs' package is not being installed.
The above is the problem.
the package.json file for 'ldap-pool' is like so:
{
"name": "ldap-pool",
"version": "0.0.1011",
"description": "LDAP client connection pool",
"main": "index.js",
"types": "index.d.ts",
"typings": "index.d.ts",
"scripts": {
"test": "./#test.sh"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ORESoftware/ldap-pool.git"
},
"keywords": [
"ldap",
"pool",
"client",
"connection",
"ldapjs"
],
"author": "Olegzandr VD",
"license": "ISC",
"bugs": {
"url": "https://github.com/ORESoftware/ldap-pool/issues"
},
"homepage": "https://github.com/ORESoftware/ldap-pool#readme",
"dependencies": {
"chalk": "^1.1.3",
"ldapjs": "^1.0.1"
},
"devDependencies": {
"#types/chalk": "^0.4.31",
"#types/ldapjs": "^1.0.0",
"#types/node": "^7.0.31"
}
}
When I install ldap-pool in another project, I see:
if I hover over the red squiggly, I see:
Does anyone know why the ldapjs typings are not being included when I run
npm install
?
The typings files need to be moved to the dependencies section of the ldap-pool package.json. Any devDependencies for a module will not be downloaded when the module is used as a dependency.
...
"dependencies": {
"chalk": "^1.1.3",
"ldapjs": "^1.0.1",
"#types/chalk": "^0.4.31",
"#types/ldapjs": "^1.0.0",
"#types/node": "^7.0.31"
}
...

npm install <package> working and npm install not working

If I download the source code and run:
npm install
It crashes during installation ( I think it runs out of memory), however if I directly:
npm install bigchaindb-driver
(version 0.3.0)
Then is fine...
Log error:
npm http request GET https://registry.npmjs.org/is-fullwidth-code-point
npm http 304 https://registry.npmjs.org/is-fullwidth-code-point
npm info attempt registry request try #1 at 8:08:57 PM
npm http request GET https://registry.npmjs.org/lcid
npm info attempt registry request try #1 at 8:08:57 PM
npm http request GET https://registry.npmjs.org/mem
npm http 304 https://registry.npmjs.org/lcid
npm http 304 https://registry.npmjs.org/mem
npm info attempt registry request try #1 at 8:08:57 PM
npm http request GET https://registry.npmjs.org/invert-kv
npm http 304 https://registry.npmjs.org/invert-kv
npm info lifecycle bigchaindb-driver#0.3.0~preinstall: bigchaindb-driver#0.3.0
Killed ....] - extract:moo-server: sill gunzTarPerm extractEntry lolex.js
Btw if I install them one by one, it does not run out of memory but it is not able to install the following dependencies:
bigchaindb-driver#0.3.0 /
+-- UNMET PEER DEPENDENCY babel-eslint#8.0.0
+-- UNMET PEER DEPENDENCY eslint#4.1.1
`-- UNMET PEER DEPENDENCY webpack#3.0.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN babel-loader#7.0.0 requires a peer of webpack#2 but none was installed.
npm WARN eslint-config-airbnb-base#11.3.2 requires a peer of eslint#^3.19.0 || ^4.5.0 but none was installed.
npm WARN eslint-config-airbnb-base#11.3.2 requires a peer of eslint-plugin-import#^2.7.0 but none was installed.
npm WARN eslint-config-ascribe#3.0.4 requires a peer of babel-eslint#^7.1.1 but none was installed.
npm WARN eslint-plugin-import#2.2.0 requires a peer of eslint#2.x - 3.x but none was installed.
Why with one method is working and with the other no? what is the difference between the commands and how could I fix it?
Edit:
Ubuntu 16.04 64bit
npm 3.10.10
nodejs 6.11.4
bigchaindb-driver 0.3.0
Package.json:
{
"_args": [
[
{
"raw": "bigchaindb-driver",
"scope": null,
"escapedName": "bigchaindb-driver",
"name": "bigchaindb-driver",
"rawSpec": "",
"spec": "latest",
"type": "tag"
},
"/test_bcdb"
]
],
"_from": "bigchaindb-driver#latest",
"_id": "bigchaindb-driver#0.3.0",
"_inCache": true,
"_location": "/bigchaindb-driver",
"_nodeVersion": "7.8.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/bigchaindb-driver-0.3.0.tgz_1499272002696_0.40300624282099307"
},
"_npmUser": {
"name": "vrde",
"email": "agranzot#gmail.com"
},
"_npmVersion": "5.0.4",
"_phantomChildren": {},
"_requested": {
"raw": "bigchaindb-driver",
"scope": null,
"escapedName": "bigchaindb-driver",
"name": "bigchaindb-driver",
"rawSpec": "",
"spec": "latest",
"type": "tag"
},
"_requiredBy": [
"#USER"
],
"_resolved": "https://registry.npmjs.org/bigchaindb-driver/-/bigchaindb-driver-0.3.0.tgz",
"_shasum": "2c71ab0e49dd7cbd6f760639767d4148e911e92b",
"_shrinkwrap": null,
"_spec": "bigchaindb-driver",
"_where": "/test_bcdb",
"author": {
"name": "BigchainDB"
},
"ava": {
"files": [
"test/*.js"
],
"source": [
"**/*.{js,jsx}",
"!node_modules/**/*",
"!dist/**/*"
],
"failFast": true,
"failWithoutAssertions": false,
"tap": true,
"powerAssert": false,
"require": [
"babel-register"
],
"babel": "inherit"
},
"browser": "./dist/browser/bigchaindb-driver.cjs2.min.js",
"bugs": {
"url": "https://github.com/bigchaindb/js-bigchaindb-driver/issues"
},
"dependencies": {
"browser-resolve": "^1.11.2",
"bs58": "^4.0.0",
"buffer": "^5.0.2",
"clone": "^2.1.0",
"core-js": "^2.4.1",
"decamelize": "^1.2.0",
"es6-promise": "^4.0.5",
"fetch-ponyfill": "^4.0.0",
"five-bells-condition": "^5.0.1",
"isomorphic-fetch": "^2.2.1",
"js-sha3": "^0.6.1",
"js-utility-belt": "^1.5.0",
"json-stable-stringify": "^1.0.1",
"query-string": "^4.3.4",
"sprintf-js": "^1.0.3",
"tweetnacl": "^1.0.0",
"yarn": "^0.27.5"
},
"description": "Node.js driver for BigchainDB",
"devDependencies": {
"ava": "^0.20.0",
"babel-cli": "^6.22.2",
"babel-eslint": "^7.1.1",
"babel-loader": "^7.0.0",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-transform-es2015-modules-commonjs": "^6.23.0",
"babel-plugin-transform-export-extensions": "^6.22.0",
"babel-plugin-transform-object-assign": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015-no-commonjs": "0.0.2",
"babel-preset-latest": "^6.22.0",
"babel-runtime": "^6.22.0",
"cross-env": "^5.0.1",
"eslint": "^4.1.1",
"eslint-config-ascribe": "^3.0.4",
"eslint-plugin-import": "^2.2.0",
"husky": "^0.14.0",
"lint-staged": "^4.0.0",
"nyc": "^11.0.2",
"release-it": "^2.7.3",
"rimraf": "^2.5.4",
"sinon": "^2.3.4",
"webpack": "^3.0.0"
},
"directories": {},
"dist": {
"integrity": "sha512-zpy0xZ73PXfH2k5sNTukgd7drPvGrHcPdA520glBGRiv3pfENo3TBFtNfGBymGRVRfQ519GFR+vzCbmftCs24w==",
"shasum": "2c71ab0e49dd7cbd6f760639767d4148e911e92b",
"tarball": "https://registry.npmjs.org/bigchaindb-driver/-/bigchaindb-driver-0.3.0.tgz"
},
"gitHead": "a9fb0730727a7aca3d0f61662ad043dfca3b284f",
"homepage": "https://www.bigchaindb.com/",
"keywords": [
"bigchaindb",
"driver",
"blockchain",
"decentralized",
"dapp"
],
"license": "Apache-2.0",
"lint-staged": {
"*.js": [
"eslint"
]
},
"main": "./dist/node/index.js",
"maintainers": [
{
"name": "vrde",
"email": "agranzot#gmail.com"
}
],
"name": "bigchaindb-driver",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/bigchaindb/js-bigchaindb-driver.git"
},
"scripts": {
"build": "npm run clean && npm run build:cjs && npm run build:dist",
"build:bundle": "webpack",
"build:cjs": "cross-env BABEL_ENV=cjs babel ./src -d dist/node",
"build:dist": "cross-env NODE_ENV=production webpack -p",
"clean": "rimraf dist/bundle dist/node",
"lint": "eslint ./",
"precommit": "lint-staged",
"prepublishOnly": "npm update && npm run build",
"release": "./node_modules/release-it/bin/release.js --src.tagName='v%s' --github.release --npm.publish --non-interactive",
"release-major": "./node_modules/release-it/bin/release.js major --src.tagName='v%s' --github.release --npm.publish --non-interactive",
"release-minor": "./node_modules/release-it/bin/release.js minor --src.tagName='v%s' --github.release --npm.publish --non-interactive",
"report-coverage": "nyc report --reporter=lcov > coverage.lcov && codecov",
"test": "npm run lint && nyc ava test/ && npm run thanks && npm run report-coverage",
"thanks": "cowsay Hi, thanks for your interest in BigchainDB. We appreciate your contribution!"
},
"version": "0.3.0"
}
The package.json is the original from js-bigchaindb-driver
Finally, I found the source of the error:
npm install
Installs the package with the development dependencies and it is needed to add the flag --production not to get them.
So the equivalent will be:
npm install <package>
and
npm install --production
(assuming there is a package.json in the directory)

Git Bash and webpack

Hello guys I'm trying to learn Webpack I've been following some tutorials and I've run into some problems. I've installed webpack locally in folder I am working in with npm install webpack --save-dev. I made two JS scripts and I wanted to bundle them and I've tried following command webpack script-1.js /.bundle.js in WindowsPowerShell (I'm using Windows 7). Now this made the following error
webpack is not recognized as an internal or external command operable program or batch file
So then I installed webpack globally, and when I used the same command in PowerShell (I have opened it as an admin), it made bundle.js file but not in the directory I was working in, but in C:
Now after this failure I've decided to try using git bash. First I've tried this command webpack script-1.js /.bundle.js and got the following error
bash: webpack: command not found
Finally after some trying I was able to make it work using this command in git bash node_modules/.bin/webpack ./script-1.js bundle.js
Is there a way to fix this, so I can just type webpack instead of whole path ? Also is there a way to fix path in PowerShell ?
This is mine package.json
{
"name": "webpack-playlist",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/iamshaunjp/webpack-playlist.git"
},
"author": "me",
"license": "MIT",
"bugs": {
"url": "https://github.com/iamshaunjp/webpack-playlist/issues"
},
"homepage": "https://github.com/iamshaunjp/webpack-playlist#readme",
"devDependencies": {
"webpack": "^2.3.3"
}
}
and this is package.json located in node_modules/webpack/package.json
{
"_args": [
[
{
"raw": "webpack",
"scope": null,
"escapedName": "webpack",
"name": "webpack",
"rawSpec": "",
"spec": "latest",
"type": "tag"
},
"C:\\Users\\Djole\\Desktop\\NetNinja\\webpack-playlist"
]
],
"_from": "webpack#latest",
"_id": "webpack#2.3.3",
"_inCache": true,
"_location": "/webpack",
"_nodeVersion": "7.4.0",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/webpack-2.3.3.tgz_1491205859622_0.6350918470416218"
},
"_npmUser": {
"name": "sokra",
"email": "tobias.koppers#googlemail.com"
},
"_npmVersion": "4.0.5",
"_phantomChildren": {},
"_requested": {
"raw": "webpack",
"scope": null,
"escapedName": "webpack",
"name": "webpack",
"rawSpec": "",
"spec": "latest",
"type": "tag"
},
"_requiredBy": [
"#DEV:/",
"#USER"
],
"_resolved": "https://registry.npmjs.org/webpack/-/webpack-2.3.3.tgz",
"_shasum": "eecc083c18fb7bf958ea4f40b57a6640c5a0cc78",
"_shrinkwrap": null,
"_spec": "webpack",
"_where": "C:\\Users\\Djole\\Desktop\\NetNinja\\webpack-playlist",
"author": {
"name": "Tobias Koppers #sokra"
},
"bin": {
"webpack": "./bin/webpack.js"
},
"bugs": {
"url": "https://github.com/webpack/webpack/issues"
},
"dependencies": {
"acorn": "^4.0.4",
"acorn-dynamic-import": "^2.0.0",
"ajv": "^4.7.0",
"ajv-keywords": "^1.1.1",
"async": "^2.1.2",
"enhanced-resolve": "^3.0.0",
"interpret": "^1.0.0",
"json-loader": "^0.5.4",
"loader-runner": "^2.3.0",
"loader-utils": "^0.2.16",
"memory-fs": "~0.4.1",
"mkdirp": "~0.5.0",
"node-libs-browser": "^2.0.0",
"source-map": "^0.5.3",
"supports-color": "^3.1.0",
"tapable": "~0.2.5",
"uglify-js": "^2.8.5",
"watchpack": "^1.3.1",
"webpack-sources": "^0.2.3",
"yargs": "^6.0.0"
},
"description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",
"devDependencies": {
"beautify-lint": "^1.0.3",
"benchmark": "^2.1.1",
"bundle-loader": "~0.5.0",
"codacy-coverage": "^2.0.1",
"codecov.io": "^0.1.2",
"coffee-loader": "~0.7.1",
"coffee-script": "^1.10.0",
"coveralls": "^2.11.2",
"css-loader": "~0.25.0",
"es6-promise-polyfill": "^1.1.1",
"eslint": "3.12.2",
"eslint-plugin-node": "^3.0.5",
"express": "~4.13.1",
"extract-text-webpack-plugin": "^2.0.0-beta",
"file-loader": "~0.9.0",
"i18n-webpack-plugin": "^0.3.0",
"istanbul": "^0.4.5",
"jade": "^1.11.0",
"jade-loader": "~0.8.0",
"js-beautify": "^1.5.10",
"less": "^2.5.1",
"less-loader": "^2.0.0",
"lodash": "^4.17.4",
"mocha": "^3.2.0",
"mocha-lcov-reporter": "^1.0.0",
"nsp": "^2.6.1",
"raw-loader": "~0.5.0",
"react": "^15.2.1",
"react-dom": "^15.2.1",
"script-loader": "~0.7.0",
"should": "^11.1.1",
"simple-git": "^1.65.0",
"sinon": "^1.17.7",
"style-loader": "~0.13.0",
"url-loader": "~0.5.0",
"val-loader": "~0.5.0",
"vm-browserify": "~0.0.0",
"webpack-dev-middleware": "^1.9.0",
"worker-loader": "~0.7.0"
},
"directories": {},
"dist": {
"shasum": "eecc083c18fb7bf958ea4f40b57a6640c5a0cc78",
"tarball": "https://registry.npmjs.org/webpack/-/webpack-2.3.3.tgz"
},
"engines": {
"node": ">=4.3.0 <5.0.0 || >=5.10"
},
"files": [
"lib/",
"bin/",
"buildin/",
"hot/",
"web_modules/",
"schemas/"
],
"gitHead": "ba24c1b163dc038ed738eb4a57dcb241bf63146d",
"homepage": "https://github.com/webpack/webpack",
"license": "MIT",
"main": "lib/webpack.js",
"maintainers": [
{
"name": "jhnns",
"email": "mail#johannesewald.de"
},
{
"name": "sokra",
"email": "tobias.koppers#googlemail.com"
},
{
"name": "thelarkinn",
"email": "sean.larkin#cuw.edu"
}
],
"name": "webpack",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/webpack/webpack.git"
},
"scripts": {
"appveyor:benchmark": "npm run benchmark",
"appveyor:test": "node --max_old_space_size=4096 node_modules\\mocha\\bin\\mocha --harmony test/*.test.js",
"beautify-lint": "beautify-lint 'lib/**/*.js' 'hot/**/*.js' 'bin/**/*.js' 'benchmark/*.js' 'test/*.js'",
"benchmark": "mocha test/*.benchmark.js --harmony -R spec",
"build:examples": "cd examples && node buildAll.js",
"cover": "node --harmony ./node_modules/istanbul/lib/cli.js cover -x '**/*.runtime.js' node_modules/mocha/bin/_mocha -- test/*.test.js",
"cover:min": "node --harmony ./node_modules/.bin/istanbul cover -x '**/*.runtime.js' --report lcovonly node_modules/mocha/bin/_mocha -- test/*.test.js",
"lint": "eslint lib bin hot buildin test/**/webpack.config.js test/binCases/**/test.js examples/**/webpack.config.js",
"lint-files": "npm run lint && npm run beautify-lint",
"nsp": "nsp check --output summary",
"pretest": "npm run lint-files",
"publish-patch": "npm run lint && npm run beautify-lint && mocha && npm version patch && git push && git push --tags && npm publish",
"test": "mocha test/*.test.js --harmony --check-leaks",
"travis:benchmark": "npm run benchmark",
"travis:lint": "npm run lint-files && npm run nsp",
"travis:test": "npm run cover:min"
},
"version": "2.3.3",
"web": "lib/webpack.web.js"
}
EDIT:
I've come with following solution in the end:
Add this to your package.json file
"scripts" : {
"build" : "webpack ./entry.js bundle.js"
}
and then type npm run build this will still run the local version because npm will first look in ./node_modules/.bin/
That kind of path is what is used in a git for Windows bash.
See this issue
We use cmdr (http://cmder.net/ ) to emulate console on Windows machines.
Still we had to modify scripts and separate build to clean and build tasks to get it working.
"scripts": {
"clean": "rm -rf dist",
"build": "node_modules/.bin/babel-node -- ./node_modules/webpack/bin/webpack.js --stats --config ./webpack/prod.config.js",
...
},
You can see a similar instruction in this project package.json:
"build-main": "cross-env NODE_ENV=production node -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.electron.js --progress --profile --colors",

Resources