F-loat / vue-cli-plugin-qiankun

🚀 qiankun plugin for vue-cli

Home Page:https://f-loat.github.io/vue-cli-plugin-qiankun

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

安装不了依赖。

cao0714 opened this issue · comments

首先感谢你的deom,但是有个问题,我一直安装不了依赖,比如饿了么的ui

说一下你的操作步骤?依赖安装应该和常规的项目是一样的

$ cd examples
$ yarn
$ yarn install:all
$ yarn serve:all
然后 npm i element-ui -S 就报错了。

具体的错误是什么,npm 和 yarn 不要混用

D:\work\vue\foo-app>npm i element-ui -S
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your depe
ndencies to the actual version of core-js@3.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.

yorkie@2.0.0 uninstall D:\work\vue\foo-app\node_modules\yorkie
node bin/uninstall.js

husky
uninstalling Git hooks
done

npm WARN rm not removing D:\work\vue\foo-app\node_modules.bin\rimraf.cmd as it wasn't installed by D:\work\vue\foo-app\node_modules\rimraf
npm WARN rm not removing D:\work\vue\foo-app\node_modules.bin\rimraf as it wasn't installed by D:\work\vue\foo-app\node_modules\rimraf
npm WARN rm not removing D:\work\vue\foo-app\node_modules.bin\semver.cmd as it wasn't installed by D:\work\vue\foo-app\node_modules\semver
npm WARN rm not removing D:\work\vue\foo-app\node_modules.bin\semver as it wasn't installed by D:\work\vue\foo-app\node_modules\semver
npm WARN rm not removing D:\work\vue\foo-app\node_modules.bin\json5.cmd as it wasn't installed by D:\work\vue\foo-app\node_modules\json5
npm WARN rm not removing D:\work\vue\foo-app\node_modules.bin\json5 as it wasn't installed by D:\work\vue\foo-app\node_modules\json5
npm WARN rm not removing D:\work\vue\foo-app\node_modules.bin\acorn.cmd as it wasn't installed by D:\work\vue\foo-app\node_modules\acorn
npm WARN rm not removing D:\work\vue\foo-app\node_modules.bin\acorn as it wasn't installed by D:\work\vue\foo-app\node_modules\acorn

yorkie@2.0.0 install D:\work\vue\foo-app\node_modules\yorkie
node bin/install.js

setting up Git hooks
can't find .git directory, skipping Git hooks installation

core-js@3.6.5 postinstall D:\work\vue\foo-app\node_modules@vue\babel-preset-app\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:

https://opencollective.com/core-js
https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

core-js@2.6.11 postinstall D:\work\vue\foo-app\node_modules\babel-runtime\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

ejs@2.7.4 postinstall D:\work\vue\foo-app\node_modules\ejs
node ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN notsup Unsupported engine for watchpack-chokidar2@2.0.0: wanted: {"node":"<8.10.0"} (current: {"node":"12.16.3","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: watchpack-chokidar2@2.0.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":
"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"
x64"})

  • element-ui@2.13.2
    added 78 packages from 35 contributors, removed 38 packages and updated 1213 packages in 69.317s

46 packages are looking for funding
run npm fund for details
只有麻烦你看看了。

看着也没失败吧😅

看这个嘛,安装了过后,在跑
D:\work\vue\foo-app>npm run serve

foo-app@0.1.0 serve D:\work\vue\foo-app
vue-cli-service serve --port 8081

internal/modules/cjs/loader.js:960
throw err;
^

Error: Cannot find module 'vue-cli-plugin-qiankun'
Require stack:

  • D:\work\vue\foo-app\node_modules@vue\cli-service\lib\Service.js
  • D:\work\vue\foo-app\node_modules@vue\cli-service\bin\vue-cli-service.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
    at Function.Module._load (internal/modules/cjs/loader.js:840:27)
    at Module.require (internal/modules/cjs/loader.js:1019:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at idToPlugin (D:\work\vue\foo-app\node_modules@vue\cli-service\lib\Service.js:160:14)
    at D:\work\vue\foo-app\node_modules@vue\cli-service\lib\Service.js:199:20
    at Array.map ()
    at Service.resolvePlugins (D:\work\vue\foo-app\node_modules@vue\cli-service\lib\Service.js:185:10)
    at new Service (D:\work\vue\foo-app\node_modules@vue\cli-service\lib\Service.js:47:25)
    at Object. (D:\work\vue\foo-app\node_modules@vue\cli-service\bin\vue-cli-service.js:15:17) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'D:\work\vue\foo-app\node_modules\@VUE\cli-service\lib\Service.js',
    'D:\work\vue\foo-app\node_modules\@VUE\cli-service\bin\vue-cli-service.js'
    ]
    }
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! foo-app@0.1.0 serve: vue-cli-service serve --port 8081
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the foo-app@0.1.0 serve script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\caoxiaofeng\AppData\Roaming\npm-cache_logs\2020-05-25T09_48_05_162Z-debug.log

因为你之前用的是 yarn,后面又用了 npm,导致一些包被移除了,统一用 yarn 吧

yarn add element-ui

好的,感谢!