Ant-design-pro: 按照官网的“开始使用”创建项目,"npm start"直接报错“ERR_WEBPACK_MODULE_NOT_FOUND”

Created on 28 Jul 2019  ·  9Comments  ·  Source: ant-design/ant-design-pro

  • 操作系统:MacOS Mojave
  • node 版本:v10.15.3
  • npm 版本:v6.10.1

操作步骤:

$ mkdir demo
$ cd demo
$ npm create umi

依次选择 "Ant Design Pro"、"TypeScript".
然后执行:

$ npm i
$ npm start

系统输出:

$ npm start

> [email protected] start /Users/kairee/Projects/kcloud
> umi dev


✖ Webpack
  Compiled with some errors in 13.07s

Starting the development server...

Extracted theme color css content length: 9671
 ERROR  Failed to compile with 2 errors                                                                                        5:42:40 PM

These dependencies were not found:

* css-animation/es/Event in ./node_modules/antd/es/_util/wave.js
* css-animation/lib/Event in ./node_modules/antd/lib/_util/wave.js

To install them, you can run: npm install --save css-animation/es/Event css-animation/lib/Event

 ERROR CODE  ERR_WEBPACK_MODULE_NOT_FOUND

 DETAILS

## Possible Reasons

    1. The file does not exist
    2. Case problem

If the build under mac is successful and the build fails under linux or on the cloud build platform, it must be case problem.

## Solution

If it is a case, please double check that the import or require file and the target file are in the same case.


 WAIT  Compiling...                                                                                                            5:42:41 PM


✖ Webpack
  Compiled with some errors in 656.50ms

Extracted theme color css content length: 9671
 ERROR  Failed to compile with 2 errors                                                                                        5:42:42 PM

These dependencies were not found:

* css-animation/es/Event in ./node_modules/antd/es/_util/wave.js
* css-animation/lib/Event in ./node_modules/antd/lib/_util/wave.js

To install them, you can run: npm install --save css-animation/es/Event css-animation/lib/Event

 ERROR CODE  ERR_WEBPACK_MODULE_NOT_FOUND

 DETAILS

## Possible Reasons

    1. The file does not exist
    2. Case problem

If the build under mac is successful and the build fails under linux or on the cloud build platform, it must be case problem.

## Solution

If it is a case, please double check that the import or require file and the target file are in the same case.

尝试过换 npm 源,清空 npm cache,执行 npm install -S css-animation,都没用。一直是一样的无法首次启动。

Most helpful comment

https://github.com/yiminghe/css-animation/issues/20

手动安装 1.5 版本的 css-animation 解决了(非大版本号进行破坏性修改是几个意思)

All 9 comments

求问解决了吗? 我好像也遇到相同的问题

相同问题 +1

https://github.com/yiminghe/css-animation/issues/20

手动安装 1.5 版本的 css-animation 解决了(非大版本号进行破坏性修改是几个意思)

我今天也遇到了这个问题

yiminghe/css-animation#20

手动安装 1.5 版本的 css-animation 解决了(非大版本号进行破坏性修改是几个意思)

利用该方法本地构建通过了,上线还是不行

相同问题 +1

image
手动在package.json中添加"css-animation": "1.5.0", 然后重新npm install

找了半个多小时、可算能继续跑了....
希望这个问题能快点解决....

https://www.npmjs.com/package/css-animation
已经发布了新的版本。使用最新版本即可

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RichardStark picture RichardStark  ·  3Comments

952425340 picture 952425340  ·  3Comments

skyFi picture skyFi  ·  3Comments

ghost picture ghost  ·  3Comments

gaoqiang19514 picture gaoqiang19514  ·  3Comments