art-template, node_modules doesn‘t exist or is not a directory

这篇具有很好参考价值的文章主要介绍了art-template, node_modules doesn‘t exist or is not a directory。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

\art-template\lib\runtime.js doesn't exist

Parsed request is a module
using description file: d:\player\package.json (relative path: ./src/template)
  Field 'browser' doesn't contain a valid alias configuration
  resolve as module
    d:\player\src\template\node_modules doesn't exist or is not a directory
    d:\player\src\node_modules doesn't exist or is not a directory
    looking for modules in d:\player\node_modules
      single file module
        No description file found in d:\\node_modules\art-template\lib or above
        no extension
          Field 'browser' doesn't contain a valid alias configuration
          d:\\node_modules\art-template\lib\runtime.js doesn't exist
        .js
          Field 'browser' doesn't contain a valid alias configuration
          d:\\node_modules\art-template\lib\runtime.js.js doesn't exist
        .less
          Field 'browser' doesn't contain a valid alias configuration
          d:\\node_modules\art-template\lib\runtime.js.less doesn't exist
      d:\\node_modules\art-template\lib\runtime.js doesn't exist
    d:\node_modules doesn't exist or is not a directory
    d:\node_modules doesn't exist or is not a directory
    d:\node_modules doesn't exist or is not a directory
    d:\node_modules doesn't exist or is not a directory

解决办法:

修改webpack配置文 webpack\prod.config.js 

resolve: {
        modules: ['node_modules'],
        extensions: ['.js', '.less'],
        fallback: {
            dgram: false,
            fs: false,
            net: false,
            tls: false,
        },
		preferRelative: true,
    },

添加了一行 :preferRelative: true,文章来源地址https://www.toymoban.com/news/detail-823682.html

到了这里,关于art-template, node_modules doesn‘t exist or is not a directory的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • vscode设置 git提交代码忽略node_modules,dist,vscode如何设置不提交node_modules,dist

    vscode git提交时会自动把node_modules和 dist文件夹内文件上传至git中 如有其他需要忽略的目录,直接换行添加即可 在vscode命令行输入 生成gitignore文件

    2024年04月10日
    浏览(44)
  • 深入浅出Node.js中的node_modules

    在Node.js中, node_modules 是一个特殊的目录,通常用来存放项目所依赖的 npm 包及其相关依赖,以供应用程序在运行时动态加载所需的模块和库文件。 当使用 npm 或者 yarn 等包管理工具安装npm包时,会将相关依赖包下载并保存在项目的 node_modules 目录下,以便于在应用程序中引用

    2024年02月06日
    浏览(35)
  • IDEA设置忽略node_modules

    项目中有node_modules,在idea打开时,idea也会扫描该目录并索引,有时会导致卡死。 可以在 文件 ---- 设置 ---- 编辑器 ---- 文件类型,将node_modules设置为忽略文件。 修改 项目.iml 文件,在content节点增加 excludeFolder url=\\\"file://$MODULE_DIR$/node_modules\\\" /

    2024年02月08日
    浏览(37)
  • 删除&重装node_modules的方法

    先安装删除工具 删除命令 先进入子项目 装node_modules

    2024年02月06日
    浏览(49)
  • 修改node_modules里的源码

    最近在工作中使用到一款生成二维码的依赖(以vue项目为例讲解):vue-qr,安装的4.0.9版本的,在启动工程的时候报错: 后我查阅各种资料发现 1,找到node-modules下面的vue-qr文件夹 2,打开vue-qr文件夹下面的dist下面的 vue-qr.js 3,搜索 ‘…’ 字段 4, 删除 e 前面的 三个点,然后

    2024年02月14日
    浏览(55)
  • git取消提交node_modules

    1、创建.gitignore文件:在项目的根目录中创建一个名为\\\".gitignore\\\"的文件(如果尚不存在)。 2、编辑.gitignore文件:使用文本编辑器打开.gitignore文件,并在文件中添加一行指定要忽略的文件或目录。在这种情况下,您可以添加以下行以排除node_modules文件夹: 3、保存并提交.git

    2024年02月15日
    浏览(44)
  • git忽略node_modules文件

    忽略所有node_modules文件夹 些文件无需纳入 Git 的管理,也不希望它们总出现在未跟踪文件列表。 在这种情况下,我们可 以创建一个名为 .gitignore 的配置文件,列出要忽略的文件的匹配模式。 文件 .gitignore 的格式规范如下: ① 以 # 开头的是注释 ② 以 / 结尾的是目录 ③ 以

    2024年02月07日
    浏览(47)
  • node_modules.cache是什么东西

    一开始没明白这是啥玩意,还以为是npm的属性,网上也没说过具体的来源出处  .cache文件的产生是由webpack4的插件cache-loader生成的,node_modules里下载了cache-loader插件,很多朋友都是vuecli工具生成的项目,内置了这部分设置,使用在配置文件例如vue.config里看不到这部分设置  此

    2024年02月06日
    浏览(36)
  • 前端子项目共用node_modules

    项目目录结构如下 首先按上面的结构新建三个项目,有一定前端经验的都知道怎么处理,我就不多介绍了。 1,子项目1     package.json如下,我只安装了vue index.js如下 2,子项目2    package.json如下,我安装了vue 和axios 3,在安装完依赖后,把子项目1和子项目2中的node_modules删除

    2024年02月03日
    浏览(28)
  • npm安装失败;node_modules拷贝;

    当前版本: node版本:12.16.3 npm版本:6.14.4 cnpm版本:7.1.0 npm装包失败: 解决办法1:使用cnpm淘宝镜像装包(如果需要拷贝node_modules包,使用cnpm装的包会有拷贝不全丢包问题导致包不能用,需要使用办法二) 解决办法2:         报错1: cannot find module webpack         原

    2024年02月13日
    浏览(48)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包