0

尝试在 Windows 上使用 npm 安装 vuestorefront 时出现以下错误。知道如何解决吗?

TSError: ⨯ Unable to compile TypeScript:
core/scripts/server.ts:1:38 - error TS2307: Cannot find module '@vue-storefront/core/server/hooks' or 
its corresponding type declarations.

1 import { serverHooksExecutors } from '@vue-storefront/core/server/hooks'
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

at createTSError (D:\vueRepo\vue-storefront\vue-storefront\node_modules\ts-node\src\index.ts:434:12)
at reportTSError (D:\vueRepo\vue-storefront\vue-storefront\node_modules\ts-node\src\index.ts:438:19)
at getOutput (D:\vueRepo\vue-storefront\vue-storefront\node_modules\ts-node\src\index.ts:578:36)
at Object.compile (D:\vueRepo\vue-storefront\vue-storefront\node_modules\ts-node\src\index.ts:775:32)
at Module.m._compile (D:\vueRepo\vue-storefront\vue-storefront\node_modules\ts-node\src\index.ts:858:43)
at Module._extensions..js (internal/modules/cjs/loader.js:1164:10)
at Object.require.extensions.<computed> [as .ts] (D:\vueRepo\vue-storefront\vue-storefront\node_modules\ts-node\src\index.ts:861:12)
at Module.load (internal/modules/cjs/loader.js:993:32)
at Function.Module._load (internal/modules/cjs/loader.js:892:14)
4

1 回答 1

0

vue-storefront使用 yarn 效果更好。尝试更新你的纱线,然后yarn installyarn dev. 更多信息可以在这里找到。

于 2020-10-05T14:05:03.410 回答