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! code ELIFECYCLE
npm ERR! errno 1
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 helloworldapp 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 helloworldapp
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls helloworldapp
npm ERR! There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/aakash/.npm/_logs/2017-04-12T09_51_55_188Z-debug.log
-2
A
Antwort
0
Da die Fehlermeldung sagt:
configuration.output.path: The provided value "" is not an absolute path!
Warum das ist eine leere Zeichenfolge anstelle des tatsächlichen Werts von output.path
Anzeige, habe ich keine Ahnung - aber so oder so, Ihre Konfiguration ist falsch . Der Wert von output.path
hat, um ein absoluter Pfad zu sein, und Sie haben Ihren als einen relativen Pfad festgelegt.
Der üblicher Weg, um diese Menschen durch den Import der path
Modul von Knoten ist erhalten, und mit path.join
, etwa so:
var path = require('path');
module.exports = {
/// ...
output: {
path: path.resolve(__dirname, "dist"),
filename: "index.js"
},
// ...
};
Aber da man nur versuchen, die Ausgabedatei im Root-Dump Verzeichnis, Sie könnten nur mit dabei tun:
// no path import needed
module.exports = {
// ...
output: {
path: __dirname,
filename: "index.js"
},
// ...
};
Verwandte Themen
- 1. Wie vermeidet man, dass reactjs zweimal in einer Rails and Reacts-Umgebung enthalten sind?
- 2. Reactjs: jQuery benutzerdefinierten Inhalt Scroller mit reactjs
- 3. Benutzerdefinierte Befehl für ‚\ {Umgebung} begin ... \ end {Umgebung}‘
- 4. Reactjs - Objektorientiert?
- 5. ReactJS this.state
- 6. Reactjs Vererbung
- 7. ReactJS - Unexpected "`"
- 8. Reactjs galerieblock
- 9. ReactJS gefährlichSetStyle?
- 10. Reactjs Komponententest
- 11. Wie Eingabe nur die Kontrolle in reactjs
- 12. Server-Umgebung
- 13. Asp.net-Umgebung
- 14. Umgebung Aktivierung
- 15. ReactJS und separates Modell
- 16. ReactJS: onClick Element ändern
- 17. Reactjs Funktionsaufruf Fehler
- 18. ReactJS: Textausrichtung funktioniert nicht
- 19. ReactJS Erste Schritte
- 20. reactJs auf IE9 Wurffehler
- 21. ReactJS Shop nicht
- 22. ReactJS, wenn Benutzer scroolet
- 23. ausgewählter Wert DropDown reactjs
- 24. ReactJs Druckwert des Eingabefeldes
- 25. Reactjs - Steuern mehrerer Checkboxen
- 26. Reactjs - Wert undefined
- 27. ReactJS - Passing-Funktion tiefer
- 28. ReactJS + gestylt Komponenten + PseudoClasses
- 29. reactjs render Bild dynamisch
- 30. Erstellen eines ReactJS-Portals
Die Fehlermeldung ist ziemlich klar - die 'output.path' in Ihrer Konfigurationsdatei ist nicht festgelegt. –
Ich mache Umgebung Setup von [https://www.tutorialspoint.com/reactjs/reactjs_environment_setup.html]. Ich habe Ordnerstruktur die gleiche wie gesagt, aber ich bin über configuration.output.path error –
Dieser Link existiert nicht - haben Sie falsch buchstabieren? In beiden Fällen sollten Sie Ihre Frage "webpack.config.js" hinzufügen, da dies das Problem ist. –