porter icon indicating copy to clipboard operation
porter copied to clipboard

nodejs:"Error: Cannot find module 'xxxx'"解决方式

Open zhangkewei opened this issue 6 years ago • 0 comments

打包时遇到如下错误解决方式: cd porter-ui npm -p install xxxx(模块名)

> Task :manager:manager-boot:yarn_install
yarn install v1.15.2
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.90s.

> Task :manager:manager-boot:buildPorterUI FAILED
yarn node v1.15.2
internal/modules/cjs/loader.js:584
    throw err;
    ^

Error: Cannot find module 'ora'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/Users/zkevin/Documents/Workspaces/suixingpay-porter/porter-ui/builder/build.js:8:13)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
error Command failed.
Exit code: 1
Command: /Users/zkevin/Documents/Workspaces/suixingpay-porter/manager/manager-boot/build/node/node-v10.15.3-darwin-x64/bin/node
Arguments: /Users/zkevin/Documents/Workspaces/suixingpay-porter/porter-ui/builder/build.js
info Visit https://yarnpkg.com/en/docs/cli/node for documentation about this command.
Directory: /Users/zkevin/Documents/Workspaces/suixingpay-porter/porter-ui
Output:

zhangkewei avatar Jul 02 '19 03:07 zhangkewei