报错1
C:\adanhuan\workspace-cy\cyTaxiVue>cnpm i
(node:1264) ExperimentalWarning: The fs.promises API is experimental
/ [0/66] Installing vue-router@^3.0.1[slideout@1.0.1 › emitter@git+https://github.com/Mango/emitter.git#0.0.7] install emitter from git git+https://github.com/Mango/emitter.git#0.0.7, may be very slow, please keep patience
\ [48/66] Installing request@^2.87.0platform unsupported babel-loader@7.1.5 › webpack@3.12.0 › watchpack@1.6.0 › chokidar@2.0.4 › fsevents@^1.2.2 Package require os(darwin) not compatible with your platform(win32)
[fsevents@^1.2.2] optional install error: Package require os(darwin) not compatible with your platform(win32)
√ Installed 66 packages
√ Linked 956 latest versions
ChromeDriver binary exists. Validating...
ChromeDriver 2.44.609538 (b655c5a60b0b544917107a59d4153d4bf78e1b90)
ChromeDriver is already available!
Copying to target path C:\adanhuan\workspace-cy\cyTaxiVue\node_modules\_chromedriver@2.44.0@chromedriver\lib\chromedriver
Done. ChromeDriver binary available at C:\adanhuan\workspace-cy\cyTaxiVue\node_modules\_chromedriver@2.44.0@chromedriver\lib\chromedriver\chromedriver.exe
Love Swiper? Support Vladimir's work by donating or pledging on patreon:
> https://patreon.com/vladimirkharlampidi
√ Run 3 scripts
deprecate postcss-px2rem@0.3.0 › px2rem@0.5.0 › fs-extra@0.16.5 › graceful-fs@^3.0.5 please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
deprecate autoprefixer@7.2.6 › browserslist@^2.11.3 Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
deprecate css-loader@0.28.11 › cssnano@3.10.0 › postcss-merge-rules@2.1.2 › browserslist@^1.5.2 Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
deprecate nightwatch@0.9.21 › proxy-agent@2.0.0 › socks-proxy-agent@2.1.1 › socks@~1.1.5 If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
deprecate webpack-bundle-analyzer@2.13.1 › bfj-node4@^5.2.0 Switch to the `bfj` package for fixes and new features!
Recently updated (since 2018-11-17): 9 packages (detail see file C:\adanhuan\workspace-cy\cyTaxiVue\node_modules\.recently_updates.txt)
√ All packages installed (1168 packages installed from npm registry, 1 packages installed from git, used 41s(network 37s), speed 60.8kB/s, json 1021(2.21MB), tarball 0B)
解决办法:虽然提示不适合Windows,但是问题好像是sass loader出问题的。所以只要执行下面命令即可;
$ cnpm rebuild node-sass
再安装依赖包,
$ cnpm i
运行结果如下图,安装依赖成功!报错2
(Emitted value instead of an instance of Error) autoprefixer:
C:\adanhuan\workspace-cy\cyTaxiVue\node_modules\_vue-layer-mobile@1.2.0@vue-layer-mobile\need\layer.css:1:3523:
You should write display: flex by final spec instead of display: box
解决办法:打开报错路径指向的依赖包,把display: box改成 display: flex
存在问题:这样修改依赖包,每次下载依赖都要修改,很诡异,但是不修改,又会报错。求有没有好一点的解决办法。