2017-09-18 6 views
-1

Verwenden Sie webpack + vue, um das Projekt zu erstellen, Webpack-Paket immer Fehleraufforderung, siehe den Code.Modul nicht gefunden (webpack + vue)

G:\test\webpack_vue>webpack 
Hash: 3a2915ed9e32c621ed2c 
Version: webpack 3.6.0 
Time: 608ms 
    Asset Size Chunks    Chunk Names 
build.js 208 kB  0 [emitted] main 
    [0] ./src/main.js 133 bytes {0} [built] 
    [3] (webpack)/buildin/global.js 509 bytes {0} [built] 
    + 2 hidden modules 

ERROR in ./src/main.js 
Module not found: Error: Can't resolve 'vue-loader' in 'G:\test\webpack_vue' 
@ ./src/main.js 4:0-28 

Also habe ich neu installiert alle Module, schlug die Ergebnisse nach wie vor, dass der Fehler, die Details auf den Code suchen.

G:\test\webpack_vue>npm install --save-dev babel-core babel-loader babel-plugin- 
transform-runtime babel-preset-es2015 babel-runtime css-loader vue-hot-reload-ap 
i vue-html-loader vue-style-loader vue-loader 
npm WARN deprecated [email protected]: We're super � excited that you' 
re trying to use ES2015 syntax, but instead of making more yearly presets � , Ba 
bel now has a better preset that we recommend you use instead: npm install babel 
-preset-env --save-dev. preset-env without options will compile ES2015+ down to 
ES5 just like using all the presets together and thus is more future proof. It a 
lso allows you to target specific browsers so that Babel can do less work and yo 
u can ship native ES2015+ to user � ! We are also in the process of releasing v7 
, so please give http://babeljs.io/blog/2017/09/12/planning-for-7.0 a read and h 
elp test it out in beta! Thanks so much for using Babel �, please give us a foll 
ow on Twitter @babeljs for news on Babel, join slack.babeljs.io for discussion/d 
evelopment and help support the project at opencollective.com/babel 
[email protected] G:\test\webpack_vue 
+-- [email protected] 
+-- [email protected] 
+-- [email protected] 
+-- [email protected] 
+-- [email protected] 
+-- [email protected] 
+-- [email protected] 
+-- [email protected] 
`-- [email protected] 

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modules\ch 
okidar\node_modules\fsevents): 
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected] 
1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"} 
) 
npm WARN [email protected] No description 
npm WARN [email protected] No repository field. 
npm WARN The package babel-core is included as both a dev and production depende 
ncy. 
npm WARN The package babel-loader is included as both a dev and production depen 
dency. 
npm ERR! path G:\test\webpack_vue\node_modules\js-beautify\js\bin\css-beautify.j 
s 
npm ERR! code ENOENT 
npm ERR! errno -4058 
npm ERR! syscall chmod 
npm ERR! enoent ENOENT: no such file or directory, chmod 'G:\test\webpack_vue\no 
de_modules\js-beautify\js\bin\css-beautify.js' 
npm ERR! enoent ENOENT: no such file or directory, chmod 'G:\test\webpack_vue\no 
de_modules\js-beautify\js\bin\css-beautify.js' 
npm ERR! enoent This is most likely not a problem with npm itself 
npm ERR! enoent and is related to npm not being able to find a file. 
npm ERR! enoent 

npm ERR! A complete log of this run can be found in: 
npm ERR!  C:\Users\神盾局\AppData\Roaming\npm-cache\_logs\2017-09-18T09_54_48 
_972Z-debug.log 

Gebastelt für zwei Tage, immer noch keine Wirkung, große Jungs helfen, danke.

Antwort

0

Es ist das Problem mit beatify-web/js-beautify Abhängigkeit. Schauen Sie sich here an.

Als vorübergehende Lösung können Sie die folgende Abhängigkeit "js-beautify": "1.6.14" verwenden, indem Sie sie in die Datei package.json hinzufügen.

Verwandte Themen