gpt4 book ai didi

javascript - Svelte/Sapper - 运行 __sapper__/build 找不到模块

转载 作者:行者123 更新时间:2023-12-01 00:25:31 24 4
gpt4 key购买 nike

我在开发中或通过npm run build实际构建的过程中没有遇到任何错误。 ,但在尝试运行 node __sapper__/build 时在我的 Linux VM 上,我得到一个 Cannot find module错误

/opt/bitnami/apps/bookbot/htdocs$ node __sapper__/build
Starting server on port 3000
internal/modules/cjs/loader.js:628
throw err;
^Error: Cannot find module 'lodash/groupby'

Require stack:
- /opt/bitnami/apps/bookbot/htdocs/__sapper__/build/server/bookings-b0b7de1b.js
- /opt/bitnami/apps/bookbot/htdocs/__sapper__/build/server/server.js
- /opt/bitnami/apps/bookbot/htdocs/__sapper__/build/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:625:15)
at Function.Module._load (internal/modules/cjs/loader.js:527:27)
at Module.require (internal/modules/cjs/loader.js:683:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object.<anonymous> (/opt/bitnami/apps/bookbot/htdocs/__sapper__/build/server/bookings-b0b7de1b.js:10:1)
at Module._compile (internal/modules/cjs/loader.js:777:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:788:10)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:683:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/opt/bitnami/apps/bookbot/htdocs/__sapper__/build/server/bookings-b0b7de1b.js',
'/opt/bitnami/apps/bookbot/htdocs/__sapper__/build/server/server.js',
'/opt/bitnami/apps/bookbot/htdocs/__sapper__/build/index.js'
]}

我已经尝试过npm i lodash --save ,没有区别。不确定我哪里出错了?

最佳答案

不应该是带有大写“B”的lodash/groupBy吗?你如何在开发中做到这一点?

关于javascript - Svelte/Sapper - 运行 __sapper__/build 找不到模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59047914/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com