webpack-war-archiver-plugin's People
webpack-war-archiver-plugin's Issues
EPERM: operation not permitted
I get the below error when I integrate this plugin to my Angular2-rc4 + Webpack application.
_Unhandled rejection Error: EPERM: operation not permitted, stat 'C:\Config.Msi'
at Error (native)
at Object.fs.statSync (fs.js:981:18)
at EasyZip.zipFolder (C:\Users\ug561e\projects\WebUi\src\main\webapp\node_modules\easy-zip\easyzip.js:83:14)
at Compiler. (C:\Users\ug561e\projects\WebUi\src\main\webapp\node_modules\webpack-war-archiver-plugin\index.js:15:13)
at Compiler.applyPlugins (C:\Users\ug561e\projects\WebUi\src\main\webapp\node_modules\tapable\lib\Tapable.js:26:37)
at Watching.done (C:\Users\ug561e\projects\WebUi\src\main\webapp\node_modules\webpack\lib\Compiler.js:78:17)
at Watching. (C:\Users\ug561e\projects\WebUi\src\main\webapp\node_modules\webpack\lib\Compiler.js:61:18)
at Compiler.emitRecords (C:\Users\ug561e\projects\WebUi\src\main\webapp\node_modules\webpack\lib\Compiler.js:282:37)
at Watching. (C:\Users\ug561e\projects\WebUi\src\main\webapp\node_modules\webpack\lib\Compiler.js:58:19)
at C:\Users\ug561e\projects\WebUi\src\main\webapp\node_modules\webpack\lib\Compiler.js:275:11
at Compiler.next (C:\Users\ug561e\projects\WebUi\src\main\webapp\node_modules\tapable\lib\Tapable.js:67:11)
at Compiler. (C:\Users\ug561e\projects\WebUi\src\main\webapp\node_modules\copy-webpack-plugin\dist\index.js:190:13)
at Compiler.applyPluginsAsync (C:\Users\ug561e\projects\WebUi\src\main\webapp\node_modules\tapable\lib\Tapable.js:71:13)
at Compiler.afterEmit (C:\Users\ug561e\projects\WebUi\src\main\webapp\node_modules\webpack\lib\Compiler.js:272:8)
at Compiler. (C:\Users\ug561e\projects\WebUi\src\main\webapp\node_modules\webpack\lib\Compiler.js:267:14)
at C:\Users\ug561e\projects\WebUi\src\main\webapp\node_modules\webpack\node_modules\async\lib\async.js:52:16
at Object.async.forEachOf.async.eachOf (C:\Users\ug561e\projects\WebUi\src\main\webapp\node_modules\webpack\node_modules\async\lib\async.js:236:30)
at Object.async.forEach.async.each (C:\Users\ug561e\projects\WebUi\src\main\webapp\node_modules\webpack\node_modules\async\lib\async.js:209:22)
at Compiler.emitFiles (C:\Users\ug561e\projects\WebUi\src\main\webapp\node_modules\webpack\lib\Compiler.js:235:20)
at MemoryFileSystem.(anonymous function) as mkdirp
at Compiler. (C:\Users\ug561e\projects\WebUi\src\main\webapp\node_modules\webpack\lib\Compiler.js:229:25)
at Compiler.next (C:\Users\ug561e\projects\WebUi\src\main\webapp\node_modules\tapable\lib\Tapable.js:67:11)
[default] Checking started in a separate process...
war is empty
I don't know how this works.
Where are the parameters getting used?
module.exports = {
plugins: [
new WarArchiverPlugin({
fileName: "project-name.war",
rootFolder: "project-name",
dir: "." //this is an extra parameter that is being consumed but not defined.
})
]
}
function WarArchiverPlugin(options) {
console.log(options);
this.options = options || {};
this.fileName = options.fileName || 'project.zip';
this.rootFolder = options.dir || 'project';
}
WarArchiverPlugin.prototype.apply = function(compiler) {
var self = this;
var options = compiler.options;
options.output.path = this.rootFolder;
console.log(options); // I added above two lines and then war was created ... without it, war was empty. How will it automatically understand this path?
compiler.plugin('done', function() {
var zip = new EasyZip();
zip.zipFolder(options.output.path, function() {
zip.writeToFile(path.join(options.output.path, '..', self.fileName));
}, {
rootFolder: self.rootFolder
});
});
};
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed
configuration:
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery"
}),
// Generate index.html with included script tags
new HtmlWebpackPlugin({
inject : 'body',
template: 'app.html',
chunks : ['vendor', 'app'],
filename: 'app.html'
}),
new HtmlWebpackPlugin({
inject : 'body',
template: 'login.html',
chunks : ['vendorLogin', 'login'],
filename: 'login.html'
}),
// Remove build related folders
new CleanPlugin(['dist']),
new CopyWebpackPlugin([{
from: '../images',
to: 'app/images'
},
{
from: '../../app.config.js'
},
{
from: '../../index.html'
}
]),
new WarArchiverPlugin({
fileName: "client.war",
rootFolder: "monza"
})
/*new webpack.optimize.CommonsChunkPlugin(
/!* chunkName: *!/ 'vendor',
/!* filename: *!/ 'vendor.[hash].js'
)*/
],
Result:
Security context: 000002B0E2BE3AD1
2: uint8Array2String [D:\DEV\monza\monza-client\node_modules\easy-zip\jszip.js:~791] [pc=000001729A3EE6D3](this=000001119B4D9ED1 <an Object with map 0000002B8B1BBD71>,array=000002B0E2BFCF29 <an Uint8Array with map 00000286F960A199)
3: /* anonymous */ [D:\DEV\monza\monza-client\node_modules\easy-zip\jszip.js:183] [pc=000001729A4C4045] (this=000001C1CA09E3B9 <an EasyZip with map 00000...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "bundle"
npm ERR! node v5.7.1
npm ERR! npm v3.6.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] bundle: webpack -p --progress
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the [email protected] bundle script 'webpack -p --progress'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the monza-client package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack -p --progress
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs monza-client
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls monza-client
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\DEV\monza\monza-client\npm-debug.log
npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'bundle' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebundle', 'bundle', 'postbundle' ]
5 info lifecycle [email protected]prebundle: [email protected]prebundle: no script for prebundle, continuing
6 silly lifecycle [email protected]
7 info lifecycle [email protected]bundle: [email protected]bundle: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
9 verbose lifecycle [email protected]bundle: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;D:\DEV\monza\monza-client\node_modules.bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\VisualSVN\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft SQL Server\110\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.1;C:\Program Files (x86)\Git\cmd;C:\Program Files\nodejs; C:\apache-maven-3.2.3\bin;C:\Program Files (x86)\Git\bin;C:\Ruby193\bin;C:\Python27;C:\Monza\maven\apache-maven-3.3.9\bin;C:\Users\alonav\AppData\Roaming\npmbundle: CWD: D:\DEV\monza\monza-client
10 verbose lifecycle [email protected]
11 silly lifecycle [email protected]bundle: Args: [ '/d /s /c', 'webpack -p --progress' ]bundle: Returned: code: 3 signal: null
12 silly lifecycle [email protected]
13 info lifecycle [email protected]~bundle: Failed to exec bundle script
14 verbose stack Error: [email protected] bundle: webpack -p --progress
14 verbose stack Exit status 3
14 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:232:16)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at EventEmitter.emit (events.js:185:7)
14 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at ChildProcess.emit (events.js:185:7)
14 verbose stack at maybeClose (internal/child_process.js:827:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid [email protected]
16 verbose cwd D:\DEV\monza\monza-client
17 error Windows_NT 6.1.7601
18 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "bundle"
19 error node v5.7.1
20 error npm v3.6.0
21 error code ELIFECYCLE
22 error [email protected] bundle: webpack -p --progress
22 error Exit status 3
23 error Failed at the [email protected] bundle script 'webpack -p --progress'.
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 monza-client package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error webpack -p --progress
23 error You can get information on how to open an issue for this project with:
23 error npm bugs monza-client
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls monza-client
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.