Npm start errors Uncaught Error: Cannot find module 'serialport - node.js

I got an error when I'm trying to run my angular app.
I have installed nodejs,python,electron but can't run the app...
I write "npm start" command in CMD but I got an error like this:
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)
Could someone help me ?

I believe you are using the wrong command run the angular application you need to use the following command to run the angular application.
Navigate to your project directory and run the following command.
ng serve
Hope this will help!

I fixed it!
I deleted node_modules folder and reinstalled npm and now it's all okay. Thanks to all!

Related

Cannot run Angular app from browser

I got the following error messages when accessing my app from the browser with :
54.255.239.55:3443/home/app/index.html
GET https://54.255.239.55:3443/home/bower_components/angular/angular.min.js net::ERR_CONNECTION_RESET
GET https://54.255.239.55:3443/home/bower_components/angular-ui-router/release/angular-ui-router.min.js net::ERR_CONNECTION_RESET
GET https://54.255.239.55:3443/home/bower_components/font-awesome/css/font-awesome.min.css net::ERR_CONNECTION_RESET
GET https://54.255.239.55:3443/home/app/styles/bootstrap-social.css net::ERR_CONNECTION_RESET
GET https://54.255.239.55:3443/home/bower_components/bootstrap/dist/css/bootstrap-them.min.css net::ERR_CONNECTION_RESET
Uncaught TypeError: Cannot read property '$$minErr' of undefined
at angular-resource.min.js:6
at angular-resource.min.js:14
Uncaught TypeError: Cannot read property 'module' of undefined
at angular-resource.min.js:6
at angular-resource.min.js:14
Uncaught TypeError: Cannot read property 'module' of undefined
at ngDialog.min.js:2
at ngDialog.min.js:2
at ngDialog.min.js:2
Uncaught ReferenceError: angular is not defined
at app.js:3
Uncaught ReferenceError: angular is not defined
at controllers.js:3
Uncaught ReferenceError: angular is not defined
at services.js:3
My project file structure is:
app
-images
-scripts
-styles
-views
bower_components
-css
-bootstrap.css
-bootstrap.css.map
-bootstrap.min.css
-bootstrap.min.css.map
-bootstrap-theme.css
-bootstrap-theme.css.map
-bootstrap-theme.min.css
-bootstrap-theme.min.css.map
-fonts
-js
-bootstrap.js
-bootstrap.min.js
-npm.js
-node_modules
I need help please.

PhatomJS: How can I use(require) an npm module in phatom js?

i'm trying to require() and use this logging module (it has some dependencies also) in phatomJS but it fails and prints this error:
C:\node\scrap>phantomjs app.js
ReferenceError: Can't find variable: process
phantomjs://platform/index.js:3
ReferenceError: Can't find variable: process
phantomjs://platform/index.js:9
TypeError: undefined is not an object (evaluating 'chalk.bold.red')
phantomjs://platform/index.js:29
TypeError: undefined is not a constructor (evaluating 'log.info('All settings loaded, start with exe
cution')')
phantomjs://code/app.js:16 in global code
I don't know why or what's wrong ? what am I missing ?

Uncaught NoMethodError: undefined method `render' for #<Element [<div

I want to mount my component use this code in Opal file:
Element['#wizard_param_grid_editor'].render do
ZGrid(rows: #work_spaces)
End
I got the Error
Uncaught NoMethodError: undefined method render' for #]>
change
require 'opal-jquery'
before
require 'reactive-ruby'
fix this

Loading "connect_proxy.js" tasks...ERROR >> TypeError: Cannot read property 'prototype' of undefined

I'm trying to run a http server using grunt. However, when I type grunt serve in the appropriate directory, I'm presented with the following errors:
Loading "connect_proxy.js" tasks...ERROR
>> TypeError: Cannot read property 'prototype' of undefined
Loading "connect_proxy.js" tasks...ERROR
>> TypeError: Cannot read property 'prototype' of undefined
Looks like some dependencies issues, look at this, apparently its solved if you update your "grunt-connect-proxy"
"devDependencies": {
"grunt-connect-proxy": "^0.2.0"
}
https://github.com/drewzboto/grunt-connect-proxy/issues/97

Modx Revilution error "Uncaught SyntaxError: Unexpected token < lang.js.php:1" in Chrome Dev Tool

After installing ModX Revo 2.2.2 and logging in I can see only the menu which is not working properly. Also I've got several errors in my Chrome console:
Uncaught SyntaxError: Unexpected token < lang.js.php:1
Resource interpreted as Script but transferred with MIME type application/octet-stream: "/connectors/layout/modx.config.js.php?action=&wctx=mgr". /manager/:16
Uncaught SyntaxError: Unexpected token < modx.config.js.php:1
Uncaught ReferenceError: _ is not defined index.php:103
(anonymous function) index.php:103
Uncaught ReferenceError: _ is not defined index.php:1
Uncaught TypeError: undefined is not a function ext-all.js:7
Uncaught ReferenceError: _ is not defined
If you have some compression moduls, try turn them off. In my case it was
php_flag zlib.output_compression On
php_value zlib.output_compression_level 5
in .htaccess.

Resources