V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
normaljq
V2EX  ›  前端开发

求助!启动微信小程序的时候报错,不知道怎么解决

  •  
  •   normaljq · 2022-10-18 17:22:57 +08:00 · 933 次点击
    这是一个创建于 752 天前的主题,其中的信息可能已经有所发展或是发生改变。

    小程序在 npm run dev:mp-weixin 的时候会报如下错误,google 查了下还是不知道怎么改

    错误信息日志


    0 info it worked if it ends with ok
    1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'dev:mp-weixin' ]
    2 info using [email protected]
    3 info using [email protected]
    4 verbose run-script [ 'predev:mp-weixin', 'dev:mp-weixin', 'postdev:mp-weixin' ]
    5 info lifecycle [email protected]~predev:mp-weixin: [email protected]
    6 info lifecycle [email protected]~dev:mp-weixin: [email protected]
    7 verbose lifecycle [email protected]~dev:mp-weixin: unsafe-perm in lifecycle true
    8 verbose lifecycle [email protected]~dev:mp-weixin: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/fjq/Desktop/jc-smart-uni-app-main/node_modules/.bin:/opt/homebrew/bin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/mysql/bin:/Users/fjq/environment/apache-maven-3.6.3/bin
    9 verbose lifecycle [email protected]~dev:mp-weixin: CWD: /Users/fjq/Desktop/jc-smart-uni-app-main
    10 silly lifecycle [email protected]~dev:mp-weixin: Args: [
    10 silly lifecycle   '-c',
    10 silly lifecycle   'cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch'
    10 silly lifecycle ]
    11 info lifecycle [email protected]~dev:mp-weixin: Failed to exec dev:mp-weixin script
    12 verbose stack Error: [email protected] dev:mp-weixin: `cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch`
    12 verbose stack spawn ENOENT
    12 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
    12 verbose stack     at ChildProcess.emit (node:events:513:28)
    12 verbose stack     at maybeClose (node:internal/child_process:1093:16)
    12 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
    13 verbose pkgid [email protected]
    14 verbose cwd /Users/fjq/Desktop/jc-smart-uni-app-main
    15 verbose Darwin 21.6.0
    16 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev:mp-weixin"
    17 verbose node v16.17.0
    18 verbose npm  v6.14.17
    19 error code ELIFECYCLE
    20 error syscall spawn
    21 error file sh
    22 error errno ENOENT
    23 error [email protected] dev:mp-weixin: `cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch`
    23 error spawn ENOENT
    24 error Failed at the [email protected] dev:mp-weixin script.
    24 error This is probably not a problem with npm. There is likely additional logging output above.
    25 verbose exit [ 1, true ]
    

    微信开发工具编译后,会在Console中报错 错误信息

    VM538:9 app.js 错误:
     Error: Cannot find module '@/app.config'
        at webpackMissingModule (index.ts:1)
        at Module.<anonymous> (index.ts:1)
        at Module._ (current-user.ts:27)
        at __webpack_require__ (bootstrap:91)
        at Module._ (index.ts:1)
        at __webpack_require__ (bootstrap:91)
        at Module.<anonymous> (App.vue?c220:1)
        at Module._ (App.vue?vue&type=script&lang=ts&:58)
        at __webpack_require__ (bootstrap:91)
        at Module._ (App.vue?c220:1)(env: macOS,mp,1.06.2209190; lib: 2.25.1)
    

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2936 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 02:45 · PVG 10:45 · LAX 18:45 · JFK 21:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.