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 env未正确设置 #12

Closed
cjz9032 opened this issue Mar 21, 2017 · 11 comments
Closed

node env未正确设置 #12

cjz9032 opened this issue Mar 21, 2017 · 11 comments

Comments

@cjz9032
Copy link

cjz9032 commented Mar 21, 2017

跑dev的时候,会跳过设置dev语句。
导致环境错误一系列的报错,如eslint的规则等等。

@cjz9032 cjz9032 closed this as completed Mar 21, 2017
@cjz9032 cjz9032 reopened this Mar 21, 2017
@cjz9032 cjz9032 closed this as completed Mar 21, 2017
@cjz9032 cjz9032 reopened this Mar 21, 2017
@cjz9032 cjz9032 closed this as completed Mar 21, 2017
@cjz9032 cjz9032 reopened this Mar 21, 2017
@javaswing
Copy link
Owner

@cjz9032 请说下你是什么情况下出现的错误?我自己从github上下载了,重新运行,并没有出现你说的那个错误!

@cjz9032
Copy link
Author

cjz9032 commented Mar 23, 2017

@javaSwi
//at 3 line in /build/dev-server.js
if (!process.env.NODE_ENV) process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
我直接npm run dev,会默认带上去production环境.所以这里不会设置成dev环境问题.
然后这里的condition,我不知道你加上去是为什么,我以为直接去掉这个condition就好了,这样会有什么问题吗?

@javaswing
Copy link
Owner

@cjz9032 这是vue-cli自动生成的,我没有动过这里的代码,你是不修改过这里的代码?

@cjz9032
Copy link
Author

cjz9032 commented Mar 23, 2017

如果改过我就不会这么问了...
是cli生成的啊,不理解他的应用场景,我去问问

@javaswing
Copy link
Owner

@cjz9032 好的

@cjz9032
Copy link
Author

cjz9032 commented May 11, 2017

问题找到了:汇报一下,windows和linux之间的差异..需要个cross抹平就好了
vuejs-templates/webpack#535

PS: CLI的问题就去CLI找..怪自己太年轻

@javaswing
Copy link
Owner

@cjz9032 有太多的坑,呵呵!努力填坑中

@cjz9032
Copy link
Author

cjz9032 commented May 13, 2017

@javaswing ...这也不是你的坑吧,严格来说是windows 设置环境变量的问题.
不要慌,最近准备给自己放个假回家写代码,有时间鼓捣这些了

@javaswing
Copy link
Owner

@cjz9032 有些东西就是系统之间的差异!所以说一处前端深似海啊!革命尚未成功,同志仍需努力!

@cjz9032
Copy link
Author

cjz9032 commented May 16, 2017

@javaswing 终于鼓捣出来docker了,撸一遍开发环境,装机工的活只要干一次就好了. 这种啥各种诡异的环境问题就可以无视了

@javaswing
Copy link
Owner

@cjz9032 666666666666

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

2 participants