I want to use mssql in a vue-electron project.
I installed mssql with npm.
When i want to run the app, i get the following error:
ERROR Failed to compile with 2 errors
error in ./node_modules/mssql/lib/tedious/connection-pool.js
Module parse failed: Unexpected token (39:63)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| cfg.options.database = cfg.options.database || this.config.database
| cfg.options.port = cfg.options.port || this.config.port
> cfg.options.connectTimeout = cfg.options.connectTimeout ?? this.config.connectionTimeout ?? this.config.timeout ?? 15000
| cfg.options.requestTimeout = cfg.options.requestTimeout ?? this.config.requestTimeout ?? this.config.timeout ?? 15000
| cfg.options.tdsVersion = cfg.options.tdsVersion || '7_4'
# ./node_modules/mssql/lib/tedious/index.js 4:23-51
# ./node_modules/mssql/index.js
# ./src/modules/db.js
# ./src/background.js
# multi ./src/background.js
error in ./node_modules/mssql/lib/tedious/request.js
Module parse failed: Unexpected token (446:15)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| const req = new tds.Request(command, err => {
| // tedious v15 has started using AggregateErrors to wrap multiple errors into single error objects
> (err?.errors ? err.errors : [err]).forEach((e, i, { length }) => {
| // to make sure we handle no-sql errors as well
| if (e && (!errors.length || (errors.length && errors.length >= length && e.message !== errors[errors.length - length + i].message))) {
# ./node_modules/mssql/lib/tedious/index.js 6:16-36
# ./node_modules/mssql/index.js
# ./src/modules/db.js
# ./src/background.js
# multi ./src/background.js
Can someone please help me?
Related
enter image description here
./src/componentes/Navbar.jsx 159:17
Module parse failed: Unexpected token (159:17)
You may need an appropriate loader to handle this file type.
| columnNumber: 21
| }
}, currentUser?.username), currentUser ? /#PURE/React.createElement("span", {
| onClick: logout,
| __self: _this,
./src/components/Public/HomeNavigation/index.jsx 114:14
Module parse failed: Unexpected token (114:14)
You may need an appropriate loader to handle this file type.
| columnNumber: 7
| }
}), props?.system?.loggedIn ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ListItem, {
| component: NavLink,
| to: "/",
The following error is coming in build time:
src/views/contact-page/contact.page.tsx
Line 25:29: Parsing error: Missing semicolon.
23 | const [test, setTest] = useState<string | null>(null);
24 | setTest("test");
> 25 | const test2: string = test!;
| ^
26 |
Please explain why I could not use not-null assertion operator?
I don't believe this is valid JS (Or typescript) syntax.
const test2: string = test!;
The documentation for TS doesn't list this anywhere as a valid check for null - you can do something like this with objects but I don't believe you can do this for a variable like this.
let s = e!.name; // Assert that e is non-null and access name
Even if that did work, your variable would just be undefined instead of null in the case that test was null.
Failed to Compile: Parsing error unexpected token. The error is on line 20
I am new to React I was following a Brad Traversy tutorial and cant seem to debug this code error. I included the full code below.
./src/Components/AddProject.js
Line 20: Parsing error: Unexpected token
18 | e.preventDefault();
19 | }
> 20 | if(this.refs.title.value === ''){
| ^
21 | alert('Title is required');
22 | } else {
23 | this.setState({newProject:{
You cannot attach flying code in an ES6 JavaScript Class.
It actually doesn't mean anything.
A ES6 Javascript Class will only accept constructor, fields and methods.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes
Are you sure that the code below the line of the syntax error shouldn't be wrapped into a method or into render() ?
Issue :
Someone has added a junk column in one of my table.I want to figure it out from the logs as when and from where this activity has been performed.
Please Help regarding this issue.
Make sure enable logging in postgresql.conf
1.log_destination = 'stderr' #log_destination = 'stderr,csvlog,syslog'
2.logging_collector = on #need restart
3.log_directory = 'pg_log'
4.log_file_name = 'postgresql-%Y-%m-%d_%H%M%S.log'
5.log_rotation_age = 1d
6.log_rotation_size = 10MB
7.log_min_error_statement = error
8.log_min_duration_statement = 5000 # -1 = disable ; 0 = ALL ; 5000 = 5sec
9.log_line_prefix = '|%m|%r|%d|%u|%e|'
10.log_statment = 'ddl' # 'none' | 'ddl' | 'mod' | 'all'
#prefer 'ddl' because the log output will be 'ddl' and 'query min duration'
If you don't enable it, make sure enable it now.
if you don't have log the last attempt is pg_xlogdump your xlog file under pg_xlog and look for DDL