Coder Social home page Coder Social logo

小程序导入 执行完npm 构建 一直提示这个,Error: module 'xxx/xxx/axios-miniprogram.js' is not defined, require args is 'axios-miniprogram' about axios-miniprogram HOT 5 CLOSED

easynulls avatar easynulls commented on May 26, 2024
小程序导入 执行完npm 构建 一直提示这个,Error: module 'xxx/xxx/axios-miniprogram.js' is not defined, require args is 'axios-miniprogram'

from axios-miniprogram.

Comments (5)

zjxxxxxxxxx avatar zjxxxxxxxxx commented on May 26, 2024

目前没有遇见,这可能和模块类型有一定关系,能否提供最小代码片段用于复现问题。

from axios-miniprogram.

easynulls avatar easynulls commented on May 26, 2024

目前没有遇见,这可能和模块类型有一定关系,能否提供最小代码片段用于复现问题。

可以 https://github.com/easynulls/miniprogram-typescript-starter

from axios-miniprogram.

zjxxxxxxxxx avatar zjxxxxxxxxx commented on May 26, 2024

根据提供的代码,运行后发现产物中并不包含 'axios-miniprogram' 相关代码,所以判断是构建本身的问题,和该库无关。

为了验证我的猜想,我又尝试安装 'lodash',最终得到相同的结果,这是构建本身的问题,外部依赖库被忽略掉了。

WX20231123-093012@2x

from axios-miniprogram.

easynulls avatar easynulls commented on May 26, 2024

根据提供的代码,运行后发现产物中并不包含 'axios-miniprogram' 相关代码,所以判断是构建本身的问题,和该库无关。

为了验证我的猜想,我又尝试安装 'lodash',最终得到相同的结果,这是构建本身的问题,外部依赖库被忽略掉了。

WX20231123-093012@2x

谢谢,我研究一下,

from axios-miniprogram.

easynulls avatar easynulls commented on May 26, 2024

根据提供的代码,运行后发现产物中并不包含 'axios-miniprogram' 相关代码,所以判断是构建本身的问题,和该库无关。
为了验证我的猜想,我又尝试安装 'lodash',最终得到相同的结果,这是构建本身的问题,外部依赖库被忽略掉了。
WX20231123-093012@2x

谢谢,我研究一下,

感谢指点,是我的esbuild脚本不完善导致的,因为看了小程序官方文档那些提问,被带偏了哈,谢谢作者的指点

from axios-miniprogram.

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.