Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Ale-cc opened this issue Feb 22, 2017 · 4 comments
Open

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

Ale-cc opened this issue Feb 22, 2017 · 4 comments

Comments

@Ale-cc
Copy link

Ale-cc commented Feb 22, 2017

#贴上运行编译的结构,提示安装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.

`

@scarecrowdu
Copy link
Owner

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

@Ale-cc
Copy link
Author

Ale-cc commented Feb 24, 2017

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

@scarecrowdu
Copy link
Owner

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

@fuzhaohao
Copy link

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

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

img {
    max-width: 100%;
}

before:
before
after:
after

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants