0
我試圖按照https://www.tutorialspoint.com/reactjs/reactjs_environment_setup.htm的順序在我的設備中安裝reactJS,它有Ubuntu 16.04。Ubuntu中的ReactJS安裝中的錯誤16.04
在最後,我試圖npm start
,但它導致了我下面的錯誤
> [email protected] start /var/www/html/reactjs
> webpack-dev-server --hot
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.output.path: The provided value "./" is not an absolute path!
npm ERR! Linux 4.10.0-28-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `webpack-dev-server --hot`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'webpack-dev-server --hot'.
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 reactjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack-dev-server --hot
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs reactjs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls reactjs
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /var/www/html/reactjs/npm-debug.log
我的package.json文件
{
"name": "reactjs",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "webpack-dev-server --hot"
},
"author": "",
"license": "ISC",
"dependencies": {
"react": "^15.6.1",
"webpack": "^3.5.4",
"webpack-dev-server": "^2.7.1"
}
}
準確地放置該代碼的位置? – Ninja
@RafinKarki Webpack配置文件。 –