我正在尝试为node.js创建示例neo4j-examples / movies-javascript-bolt。在启动应用程序时进行适当的预调整
npm run dev
出现以下错误,
> movies-neo4j-javascript-driver@0.0.1 dev C:\Proyectos\webpack\movies-javascript-bolt-master
> webpack-dev-server
C:\Proyectos\webpack\movies-javascript-bolt-master\node_modules\webpack-cli\bin\convert-argv.js:156
const webpackConfigurationValidationErrors = validateSchema(
^
TypeError: validateSchema is not a function
at processConfiguredOptions (C:\Proyectos\webpack\movies-javascript-bolt-master\node_modules\webpack-cli\bin\convert-argv.js:156:48)
at module.exports (C:\Proyectos\webpack\movies-javascript-bolt-master\node_modules\webpack-cli\bin\convert-argv.js:150:10)
at Object.<anonymous> (C:\Proyectos\webpack\movies-javascript-bolt-master\node_modules\webpack-dev-server\bin\webpack-dev-server.js:92:55)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
at startup (internal/bootstrap/node.js:285:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! movies-neo4j-javascript-driver@0.0.1 dev: `webpack-dev-server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the movies-neo4j-javascript-driver@0.0.1 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\Usuario\AppData\Roaming\npm-cache\_logs\2018-11-02T01_09_31_219Z-debug.log
这是默认配置,
package.json .-
{
"name": "movies-neo4j-javascript-driver",
"version": "0.0.1",
"description": "Demo application using Neo4j Driver for Javascript",
"repository": "",
"license": "PRIVATE",
"dependencies": {
"@webpack-cli/init": "^0.1.2",
"lodash": "^4.15.0",
"neo4j-driver": "^1.0.4"
},
"devDependencies": {
"babel-core": "^6.3.26",
"babel-loader": "^6.2.0",
"babel-preset-es2015": "^6.3.13",
"babel-preset-stage-0": "^6.3.13",
"css-loader": "^0.23.1",
"file-loader": "^0.8.5",
"html-webpack-plugin": "^2.10.0",
"rimraf": "^2.5.4",
"style-loader": "^0.13.1",
"webpack": "^1.12.14",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.10"
},
"scripts": {
"clean": "rimraf build && rimraf build",
"build": "webpack -p",
"start": "webpack-dev-server -p",
"dev": "webpack-dev-server"
}
}
webpack.config.js .-
'use strict';
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
/**
* Get configuration for Webpack
*
* @see http://webpack.github.io/docs/configuration
* https://github.com/petehunt/webpack-howto
*
* @param {boolean} release True if configuration is intended to be used in
* a release mode, false otherwise
* @return {object} Webpack configuration
*/
module.exports = {
entry: {
app: './src/app.js'
},
output: {
filename: 'app.js',
path: './build/',
publicPatch: './build/'
},
debug: true,
devtool: false,
stats: {
colors: true,
reasons: true
},
plugins: [
new HtmlWebpackPlugin({template: 'src/assets/index.html'})
],
resolve: {
extensions: ['', '.webpack.js', '.web.js', '.js', '.jsx']
},
module: {
loaders: [
{
test: /\.css$/,
loader: 'style!css'
},
{
test: /\.(jpe?g|png|gif|svg)$/i,
loader: 'file-loader?name=[name].[ext]'
},
{
test: /\.js|\.jsx/,
exclude: /node_modules|bower_components/,
loader: 'babel'
}
]
}
};
我认为这是由于npm模块之间的不兼容,但事实是我不确定。
任何帮助或建议将不胜感激。
谢谢