我是RoR的初学者。当我尝试将应用程序部署到heroku时,出现了问题。 Rails 5.2.4,Ruby 2.6.3。使用webpacker和VueJS。
I, [2020-05-09T07:02:55.526066 #1382] INFO -- : Writing /tmp/build_40e8cc6a8411a8d1e75d6bfb262609f6/public/assets/application-cc59bdccfa610050899c3e795de8ec65abc6c9fb7f7b86124d2fba0b60a86616.js
I, [2020-05-09T07:02:55.531714 #1382] INFO -- : Writing /tmp/build_40e8cc6a8411a8d1e75d6bfb262609f6/public/assets/application-cc59bdccfa610050899c3e795de8ec65abc6c9fb7f7b86124d2fba0b60a86616.js.gz
I, [2020-05-09T07:02:55.567485 #1382] INFO -- : Writing /tmp/build_40e8cc6a8411a8d1e75d6bfb262609f6/public/assets/application-30c261828b50e7cc64a0cb902825d044a7c4d3c4b4573bb883bc3d050b60a20b.css
I, [2020-05-09T07:02:55.567968 #1382] INFO -- : Writing /tmp/build_40e8cc6a8411a8d1e75d6bfb262609f6/public/assets/application-30c261828b50e7cc64a0cb902825d044a7c4d3c4b4573bb883bc3d050b60a20b.css.gz
Compiling...
Compilation failed:
Hash: d7a70fbde650a1687f57
Version: webpack 3.12.0
Time: 9304ms
Asset Size Chunks Chunk Names
store/base-ebc80531c22b584ddce6.js.map 1.02 kB 3 [emitted] store/base
application-567b519bd66434e7ad5b.js 123 kB 0, 2, 3 [emitted] application
templates/index-b95d66eda74f7d1745ad.js 1.73 kB 2 [emitted] templates/index
store/base-ebc80531c22b584ddce6.js 542 bytes 3 [emitted] store/base
application-567b519bd66434e7ad5b.js.map 191 kB 0, 2, 3 [emitted] application
hello_vue-3017f5af45d58ba36cd7.js.map 113 kB 1 [emitted] hello_vue
templates/index-b95d66eda74f7d1745ad.js.map 3.01 kB 2 [emitted] templates/index
hello_vue-3017f5af45d58ba36cd7.js 71 kB 1 [emitted] hello_vue
manifest.json 566 bytes [emitted]
templates/index-b95d66eda74f7d1745ad.js.gz 884 bytes [emitted]
store/base-ebc80531c22b584ddce6.js.gz 337 bytes [emitted]
manifest.json.gz 210 bytes [emitted]
hello_vue-3017f5af45d58ba36cd7.js.gz 25.2 kB [emitted]
application-567b519bd66434e7ad5b.js.gz 41.5 kB [emitted]
[0] (webpack)/buildin/global.js 509 bytes {0} {1} [built]
[6] ./app/javascript/packs/store/base.js 0 bytes {0} {3} [built]
[7] ./app/javascript/packs/templates/index.vue + 4 modules 1.53 kB {0} {2} [built]
[8] ./app/javascript/packs/application.js + 2 modules 112 kB {0} [built]
[11] ./app/javascript/packs/hello_vue.js + 5 modules 3.38 kB {1} [built]
+ 7 hidden modules
ERROR in ./app/javascript/app.vue
Module not found: Error: Can't resolve 'postcss-loader' in '/tmp/build_40e8cc6a8411a8d1e75d6bfb262609f6'
@ ./app/javascript/app.vue 4:0-87
@ ./app/javascript/packs/hello_vue.js
应用程序
<template>
<div>
<p>{{ message }}</p>
</div>
</template>
<script>
export default {
data: function () {
return {
message: "Hello Vue!"
}
}
}
</script>
<style>
</style>
如果您需要更多详细信息,请问我要发送什么,因为我不知道问题出在哪里:)
尝试这个:
yarn add --dev \ postcss-loader \ postcss-import \ postcss-cssnext \ cssnano \ sugarss \ autoprefixer