vue2.x-Cnode icon indicating copy to clipboard operation
vue2.x-Cnode copied to clipboard

构建运行报错,node-sass不存在

Open Ale-cc opened this issue 9 years ago • 4 comments

#贴上运行编译的结构,提示安装node-sass找不到,可是执行 $ npm install -D node-sass 后结果仍旧一样,无法运行。 ` Alecc@DESKTOP-B3EFTS2 MINGW64 /e/Vue_project/vue2.x-Cnode (master) $ npm run dev

[email protected] dev E:\Vue_project\vue2.x-Cnode node build/dev-server.js

正在运行开发环境

Listening at http://localhost:9090

webpack: wait until bundle finished: / ERROR Failed to compile with 2 errors19:10:28

error

Cannot find module 'node-sass'

@ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-1dc6ef03!./~/sass-loader!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/App.vue 4:14-240

error

Cannot find module 'node-sass'

@ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-7e4e6f5a&scoped=true!./~/sass-loader!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/components/Menu.vue 4:14-265

webpack built 89a36f90b0e84393e0e7 in 5208ms Hash: 89a36f90b0e84393e0e7 Version: webpack 1.14.0 Time: 5208ms Asset Size Chunks Chunk Names img/null.d601831.png 12.6 kB img/timg.f172101.jpg 12.3 kB img/error.5ec1b9b.png 16.2 kB img/vincentSea.3a189ab.jpg 48 kB vendor.js 3.55 kB 0 vendor.js main.js 1.42 MB 1, 0 main style.css 10.2 kB 1, 0 main

ERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-1dc6ef03!./~/sass-loader!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/App.vue 4:14-240

ERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-7e4e6f5a&scoped=true!./~/sass-loader!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/components/Menu.vue 4:14-265 Child html-webpack-plugin for "index.html": Asset Size Chunks Chunk Names index.html 1.45 MB 0 Child extract-text-webpack-plugin:

Child extract-text-webpack-plugin:

webpack: Failed to compile.

`

Ale-cc avatar Feb 22 '17 11:02 Ale-cc

之前叫你用cnpm install node-sass 可以了吗

scarecrowdu avatar Feb 24 '17 01:02 scarecrowdu

@vincentSea 我没有用CNPM 我用的是淘宝的镜像

Ale-cc avatar Feb 24 '17 03:02 Ale-cc

@Ale-cc node-sass 用npm装经常装不成功

scarecrowdu avatar Feb 24 '17 05:02 scarecrowdu

装个cnpm吧,简单粗暴解决node-sass安装不上

btw, To: @vincentSea 文章详情里面的图片超宽了,可以加个

img {
    max-width: 100%;
}

before: before after: after

fuzhaohao avatar Mar 02 '17 02:03 fuzhaohao