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

npm start with sass require image error #1

Open
rehorn opened this issue Aug 7, 2016 · 2 comments
Open

npm start with sass require image error #1

rehorn opened this issue Aug 7, 2016 · 2 comments

Comments

@rehorn
Copy link

rehorn commented Aug 7, 2016

ERROR in .//.npminstall/css-loader/0.23.1/css-loader?sourceMap!.//.npminstall/resolve-url-loader/1.6.0/resolve-url-loader!.//.npminstall/sass-loader/3.2.3/sass-loader?sourceMap!./client/page1/index.scss
Module not found: Error: Cannot resolve 'file' or 'directory' ./common_image.png in /Users/rehorn/Documents/Code/node/express-webpack-full-live-reload-example/client/page1
@ ./
/.npminstall/css-loader/0.23.1/css-loader?sourceMap!.//.npminstall/resolve-url-loader/1.6.0/resolve-url-loader!.//.npminstall/sass-loader/3.2.3/sass-loader?sourceMap!./client/page1/index.scss 6:272-301

ERROR in .//.npminstall/css-loader/0.23.1/css-loader?sourceMap!.//.npminstall/resolve-url-loader/1.6.0/resolve-url-loader!.//.npminstall/sass-loader/3.2.3/sass-loader?sourceMap!./client/page2/index.scss
Module not found: Error: Cannot resolve 'file' or 'directory' ./common_image.png in /Users/rehorn/Documents/Code/node/express-webpack-full-live-reload-example/client/page2
@ ./
/.npminstall/css-loader/0.23.1/css-loader?sourceMap!.//.npminstall/resolve-url-loader/1.6.0/resolve-url-loader!.//.npminstall/sass-loader/3.2.3/sass-loader?sourceMap!./client/page2/index.scss 6:272-301

@wujr5
Copy link

wujr5 commented Aug 15, 2016

按照步骤运行了以下命令:

git clone https://github.com/kenanpengyou/express-webpack-full-live-reload-example.git
cd express-webpack-full-live-reload-example/
npm install
npm install supervisor -g
npm start

报错如下:

image

请问是什么原因?

@kenanpengyou
Copy link
Owner

kenanpengyou commented Aug 16, 2016

@rehorn 看起来是css-loader等npm模块安装得有问题,删除node_modules后重新npm install试下。由于国内连接npm源不太稳定,改成https://npm.taobao.org/ 可能会更可靠一些。

@wujr5 我重新自己clone下来运行了一下,可用。看你的报错信息提示postcss-modules-values,我的这个项目并没有用到postcss,所以推断是你自己添加的。这种错误的情况也比较类似,如果npm install的任意包不是很顺利的话,都可能出现这样的异常,建议找到可能安装不完全或有错误的npm包,删除,然后重新安装。

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