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

不能在WINDOWS下运行么 #37

Open
flftfqwxf opened this issue May 8, 2016 · 10 comments
Open

不能在WINDOWS下运行么 #37

flftfqwxf opened this issue May 8, 2016 · 10 comments

Comments

@flftfqwxf
Copy link

示例不能在WINDOWS下运行么,WIN7安装过程中会报错,【prepublish】运行会报错,删除此命令后,安装无错误,但是运行npm run dev时,
ERROR in Cannot find module 'normalize-url'
@ ./examples/markdown.css 4:14-79 13:2-17:4 14:20-85

@furybean
Copy link
Contributor

furybean commented May 8, 2016

这个错看上去是因为 node_modules 没装全,把 node_modules 删掉再 npm install 试试。

@flftfqwxf
Copy link
Author

flftfqwxf commented May 9, 2016

@furybean 试过多次,不行,而且整个搜索过程中,没有找到需要装这个包的信息
我是在npm3装的,NODE版本是4.4.3,这个会不会有影响
我是在GITHUB上拉下代码,然后npm install安装,安装后会先运行prepublish命令,这个时候会报错
之后我删除了prepublish,再安装,安装时不会出错,但是运行时会报
ERROR in Cannot find module 'normalize-url'
@ ./examples/markdown.css 4:14-79 13:2-17:4 14:20-85

另外package.json里vue和vue-i18n是peerDependencies,在npm3下,不会自动安装,
我先手动安装了vue和[email protected],最新的vue-i18n是3.0以上版本,提示版本不对,所以手动安装的[email protected],然后再安装npm install所有
整个过程就是这样

@transtone
Copy link

transtone commented May 13, 2016

windows下有不少问题,建议先更新 package.json 里的包。至少现在还没有在windows下跑起来,提示:
es6.object.define-property.js:3 Uncaught TypeError: $export is not a function

linux下能跑。

另外,可否和cooking一样有个demo站?

package.json模块已更新:
https://gist.github.com/transtone/aeba06178cec835d1120293858630582

@xiaolongyuan
Copy link

+1

@liangjl76
Copy link

在windows平台下,主要有两个地方有问题

  1. package.json文件中cp指令在windws平台下没有
    "prepublish": "mkdir -p lib & cp -r src/* lib & node_modules/babel-cli/bin/babel.js lib --out-dir lib"

2.webpack.config.js文件中/node_modules/的路径问题
module: {
preLoaders: [
{ test: /.js$/, exclude: /node_modules/, loader: 'eslint-loader' }
],
loaders: [
{ test: /.js$/, exclude: /node_modules/(?!vue-desktop)/, loader: 'babel' },

@liangjl76
Copy link

对于npm 3.0以上版本对peerDependencies直接忽略了
"peerDependencies": {
"vue": "^1.0.0",
"vue-i18n": "^2.2.0"
},

@liangjl76
Copy link

总算在windows平台下编译运行起来了

@zhanghengyao
Copy link

有没有搞错,这么久都还没改过来,windows下还是有问题,KPI产物?

@isunkui
Copy link

isunkui commented Jul 15, 2016

@transtone 你好,我也遇到了下面这个错误,请问你最后在windows上解决了该问题吗?
es6.object.define-property.js:3 Uncaught TypeError: $export is not a function

@isunkui
Copy link

isunkui commented Jul 15, 2016

我按照下面的步骤已经在windows上编译运行起来了
npm 3.9.5
OS: win10

  1. 删除package.json prepublish命令,修改name属性为vue-desktop1
  2. npm install vue [email protected] vue-desktop
  3. npm install
  4. 修改webpack.config.js的loaders为:{ test: /.js$/, exclude: /node_modules/, loader: 'babel' }
  5. 复制src目录的所有文件,到lib目录下, 在项目根目录下执行node_modules/babel-cli/bin/babel.js lib --out-dir lib
  6. npm run dev

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

7 participants