Npm启动错误未捕获的错误:找不到模块'serialport

时间:2019-03-13 07:14:20

标签: node.js angular npm

当我尝试运行我的角度应用程序时出现错误。 我已经安装了nodejs,python,electron但无法运行该应用程序... 我在CMD中写了“ npm start”命令,但出现了这样的错误:

C:\xampp\htdocs\string-desktop>npm start
npm WARN invalid config registry=""
npm WARN invalid config Must be a full url with 'http://'
npm WARN invalid config registry=""
npm WARN invalid config Must be a full url with 'http://'

> ExhangeDesktop@0.1.0 start C:\xampp\htdocs\string-desktop
> electron . --enable-logging
    [11016:0313/090858.182:INFO:CONSOLE(8)] "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.", source: file:///C:/xampp/htdocs/string-desktop/src/thirdparty/less-1.3.3.min.js (8)
    [11016:0313/090858.288:INFO:CONSOLE(8)] "less: parsed file:///C:/xampp/htdocs/string-desktop/src/less/stringdesktop.less successfully.", source: file:///C:/xampp/htdocs/string-desktop/src/thirdparty/less-1.3.3.min.js (8)
    [11016:0313/090858.328:INFO:CONSOLE(8)] "less: css for file:///C:/xampp/htdocs/string-desktop/src/less/stringdesktop.less generated in 135ms", source: file:///C:/xampp/htdocs/string-desktop/src/thirdparty/less-1.3.3.min.js (8)
    [11016:0313/090858.329:INFO:CONSOLE(8)] "less: css generated in 135ms", source: file:///C:/xampp/htdocs/string-desktop/src/thirdparty/less-1.3.3.min.js (8)
    [11016:0313/090858.542:VERBOSE1:CONSOLE(7847)] "Main._createAppUI: 107.35302734375ms", source: chrome-devtools://devtools/bundled/shell.js (7847)
    [11016:0313/090858.666:VERBOSE1:CONSOLE(7847)] "Main._showAppUI: 121.22802734375ms", source: chrome-devtools://devtools/bundled/shell.js (7847)
    [11016:0313/090858.765:VERBOSE1:CONSOLE(7847)] "Main._initializeTarget: 51.9619140625ms", source: chrome-devtools://devtools/bundled/shell.js (7847)
    [11016:0313/090858.796:INFO:CONSOLE(604)] "Uncaught Error: Cannot find module 'serialport'", source: internal/modules/cjs/loader.js (604)
    [11016:0313/090858.812:INFO:CONSOLE(604)] "Uncaught Error: Cannot find module 'iconv-lite'", source: internal/modules/cjs/loader.js (604)
    [11016:0313/090858.817:INFO:CONSOLE(18)] "Uncaught TypeError: Cannot read property 'extend' of undefined", source: file:///C:/xampp/htdocs/string-desktop/src/utils/Sync.js (18)
    [11016:0313/090858.822:INFO:CONSOLE(4)] "Uncaught TypeError: Cannot read property 'extend' of undefined", source: file:///C:/xampp/htdocs/string-desktop/src/utils/EcrCommands.js (4)
    [11016:0313/090858.827:INFO:CONSOLE(3)] "Uncaught TypeError: Cannot read property 'extend' of undefined", source: file:///C:/xampp/htdocs/string-desktop/src/utils/Ecr.js (3)
    [11016:0313/090858.828:INFO:CONSOLE(1)] "Uncaught TypeError: Cannot read property 'extend' of undefined", source: file:///C:/xampp/htdocs/string-desktop/src/utils/Updater.js (1)
    [11016:0313/090858.955:WARNING:CONSOLE(184)] "%cElectron Security Warning (Insecure Content-Security-Policy)", source: C:\xampp\htdocs\string-desktop\node_modules\electron\dist\resources\electron.asar\renderer\security-warnings.js (184)
    [11016:0313/090858.977:VERBOSE1:CONSOLE(7847)] "Main._lateInitialization: 2.093994140625ms", source: chrome-devtools://devtools/bundled/shell.js (7847)
    [11016:0313/090859.346:INFO:CONSOLE(3)] "Uncaught TypeError: Cannot read property 'extend' of undefined", source: file:///C:/xampp/htdocs/string-desktop/src/controllers/Widget.js (3)
    [11016:0313/090859.354:INFO:CONSOLE(4)] "Uncaught TypeError: Cannot read property 'extend' of undefined", source: file:///C:/xampp/htdocs/string-desktop/src/controllers/TableSelector.js (4)
    [11016:0313/090859.363:INFO:CONSOLE(31)] "Uncaught TypeError: Cannot read property 'extend' of undefined", source: file:///C:/xampp/htdocs/string-desktop/src/controllers/Operation.js (31)
    [11016:0313/090859.366:INFO:CONSOLE(3)] "Uncaught TypeError: Cannot read property 'extend' of undefined", source: file:///C:/xampp/htdocs/string-desktop/src/controllers/Model.js (3)
    [11016:0313/090859.372:INFO:CONSOLE(3)] "Uncaught TypeError: Cannot read property 'extend' of undefined", source: file:///C:/xampp/htdocs/string-desktop/src/controllers/CurrencyStock.js (3)
    [11016:0313/090859.374:INFO:CONSOLE(3)] "Uncaught TypeError: Cannot read property 'extend' of undefined", source: file:///C:/xampp/htdocs/string-desktop/src/controllers/Transition.js (3)
    [11016:0313/090859.377:INFO:CONSOLE(9)] "Uncaught TypeError: Cannot read property 'extend' of undefined", source: file:///C:/xampp/htdocs/string-desktop/src/controllers/DayFinish.js (9)
    [11016:0313/090859.379:INFO:CONSOLE(3)] "Uncaught TypeError: Cannot read property 'extend' of undefined", source: file:///C:/xampp/htdocs/string-desktop/src/controllers/Controller.js (3)
    [11016:0313/090859.383:INFO:CONSOLE(4)] "Uncaught TypeError: Cannot read property 'extend' of undefined", source: file:///C:/xampp/htdocs/string-desktop/src/controllers/Config.js (4)
    [11016:0313/090859.393:INFO:CONSOLE(66)] "Uncaught TypeError: Cannot read property 'extend' of undefined", source: file:///C:/xampp/htdocs/string-desktop/src/controllers/Home.js (66)
    [11016:0313/090859.395:INFO:CONSOLE(3)] "Uncaught TypeError: Cannot read property 'extend' of undefined", source: file:///C:/xampp/htdocs/string-desktop/src/controllers/Login.js (3)
    [11016:0313/090859.398:INFO:CONSOLE(4)] "Uncaught TypeError: Cannot read property 'extend' of undefined", source: file:///C:/xampp/htdocs/string-desktop/src/controllers/DateChanger.js (4)
    [11016:0313/090859.405:INFO:CONSOLE(84)] "Uncaught TypeError: Cannot read property 'extend' of undefined", source: file:///C:/xampp/htdocs/string-desktop/src/controllers/Chatter.js (84)
    [11016:0313/090859.408:INFO:CONSOLE(4)] "Uncaught TypeError: Cannot read property 'extend' of undefined", source: file:///C:/xampp/htdocs/string-desktop/src/controllers/EcrDebug.js (4)
    [11016:0313/090859.410:INFO:CONSOLE(59)] "Uncaught TypeError: up.App is not a constructor", source: file:///C:/xampp/htdocs/string-desktop/src/init.js (59)
    [11016:0313/090859.423:INFO:CONSOLE(184)] "%cElectron Security Warning (Insecure Content-Security-Policy)", source: C:\xampp\htdocs\string-desktop\node_modules\electron\dist\resources\electron.asar\renderer\security-warnings.js (184)

有人可以帮我吗?

1 个答案:

答案 0 :(得分:0)

我相信您使用错误的命令运行角度应用程序,需要使用以下命令来运行角度应用程序。

导航到您的项目目录并运行以下命令。

  

ng服务

希望这会有所帮助!