0
Ubuntu 16.04を搭載したデバイスでreactJSを設定するために、https://www.tutorialspoint.com/reactjs/reactjs_environment_setup.htmに従ってみました。UbuntuのReactJSセットアップでエラーが発生しました。
最後に、私は、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設定ファイル。 –