Giter Site home page Giter Site logo

Comments (6)

xiaohuoni avatar xiaohuoni commented on May 28, 2024

是的

from umi-examples.

sorrycc avatar sorrycc commented on May 28, 2024

用 master 的 umi 和 [email protected] 都不能重现,删除 node_modules/umi-dlls 后重试看?

from umi-examples.

sorrycc avatar sorrycc commented on May 28, 2024

用啥安装依赖的?我看了下 react-intl 有个 prop-types 的 peerDependencies,估计项目里得安装个 prop-types 。

from umi-examples.

xiaohuoni avatar xiaohuoni commented on May 28, 2024

yarn 和npm 都有这个问题

from umi-examples.

xiaohuoni avatar xiaohuoni commented on May 28, 2024

因为react-intl的prop-types放在devDependencies中
所以,也要把react-intl放在devDependencies里面

"devDependencies": {
    "babel-plugin-module-resolver": "^3.1.0",
    "react-intl": "^2.4.0",
    "umi-plugin-dll": "*"
  }

需要在项目中安装umi 否则会提示错误

f:\umi-cli-test\umi-examples\func-test>umi dev
opts hihi
generate files in plugin1
generate files in plugin2
Failed to compile.

Cannot read property '0' of undefined

需要 把umi放在devDependencies中,否则会提示错误

f:\umi-cli-test\umi-examples\func-test>npm run start
> @ start f:\umi-cli-test\umi-examples\func-test
> umi dev
opts hihi
generate files in plugin1
generate files in plugin2
Build completed in 4.45s
Failed to compile.

dll umi
Module not found: Can't resolve 'umi' in 'f:\umi-cli-test\umi-examples\func-test'

感觉和 umijs/umi#493 这个是一个问题。
临时修改方案是:
npm i umi --D
修改package.json

{
  "scripts": {
    "start": "umi dev"
  },
  "dependencies": {
  },
  "devDependencies": {
    "babel-plugin-module-resolver": "^3.1.0",
    "react-intl": "^2.4.0",
    "umi": "^1.3.4",
    "umi-plugin-dll": "*"
  }
}

使用npm start 启动

from umi-examples.

sorrycc avatar sorrycc commented on May 28, 2024

func-test 已删除。

from umi-examples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.