run build后报错

来源:2-1 创建webpack与loader使用

慕粉3396878

2020-11-11 14:18

run build后报错

http://img2.sycdn.imooc.com/5fab81ba0001ce0b09130344.jpg

写回答 关注

2回答

  • 西门老舅
    2020-11-11 23:07:51

    需要看下具体报错情况的截图,如果完全按照视频做的话~可以指定安装跟视频一样的版本再试试

  • 幕布斯3100291
    2021-01-16 11:13:02

    是的,运行不起来,直接报错了

    K:\workSpace\ty-demo>npm run build


    > ty-demo@1.0.0 build K:\workSpace\ty-demo

    > webpack --config webpack.config.js


    asset main.js 640 bytes [emitted] (name: main)


    ERROR in main

    Module not found: Error: Can't resolve './scr/main.js' in 'K:\workSpace\ty-demo'


    webpack 5.15.0 compiled with 1 error in 49 ms

    npm ERR! code ELIFECYCLE

    npm ERR! errno 1

    npm ERR! ty-demo@1.0.0 build: `webpack --config webpack.config.js`

    npm ERR! Exit status 1

    npm ERR!

    npm ERR! Failed at the ty-demo@1.0.0 build 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!     D:\Program Files\nodejs\node_cache\_logs\2021-01-16T02_19_30_021Z-debug.log


TypeScript封装播放器组件

手把手教大家进行需求分析、组织代码,并使用组件化编写高性能代码。

7990 学习 · 60 问题

查看课程

相似问题