UnhandledPromiseRejectionWarning: Ошибка: не удается найти модуль 'svelte / compiler' - PullRequest
1 голос
/ 19 июня 2019

Я пытаюсь Svelte 3, но при запуске выдает ошибку. Я пробовал две простые конфигурации, упомянутые ниже, но они не работают.

  1. Модуль svelte устанавливается как локально, так и глобально.
  2. Модуль svelte устанавливается только локально
$npm run dev

(node:41186) UnhandledPromiseRejectionWarning: Error: Cannot find module 'svelte/compiler'
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
        at Function.Module._load (internal/modules/cjs/loader.js:520:25)
        at Module.require (internal/modules/cjs/loader.js:650:17)
        at require (internal/modules/cjs/helpers.js:20:18)
        at Object.<anonymous> (/Users/skc/.npm/_npx/41186/lib/node_modules/sapper/dist/core.js:16:30)
        at Module._compile (internal/modules/cjs/loader.js:702:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
        at Module.load (internal/modules/cjs/loader.js:612:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
        at Function.Module._load (internal/modules/cjs/loader.js:543:3)
    (node:41186) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
    (node:41186) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    created dist/module.js, dist/index.js in 5.5s
...