FireSQL icon indicating copy to clipboard operation
FireSQL copied to clipboard

Error using with TypeScript

Open nthungdev1 opened this issue 5 years ago • 6 comments

Steps to reproduce:

Install Firebase Cloud Functions with TypeScript npm install firesql Serve the functions offline

Terminal error message:

node_modules/firesql/utils.d.ts:1:45 - error TS7016: Could not find a declaration file for module './sql-parser'. '/Users/hunguyen/Desktop/Copart/notification-firebase/cloud-functions/functions/node_modules/firesql/sql-parser/index.js' implicitly has an 'any' type.

1 import { SQL_Value, SQL_AggrFunction } from './sql-parser';
                                              ~~~~~~~~~~~~~~

Full error log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'serve' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preserve', 'serve', 'postserve' ]
5 info lifecycle functions@~preserve: functions@
6 info lifecycle functions@~serve: functions@
7 verbose lifecycle functions@~serve: unsafe-perm in lifecycle true
8 verbose lifecycle functions@~serve: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/hunguyen/Desktop/Copart/notification-firebase/cloud-functions/functions/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 verbose lifecycle functions@~serve: CWD: /Users/hunguyen/Desktop/Copart/notification-firebase/cloud-functions/functions
10 silly lifecycle functions@~serve: Args: [ '-c', 'npm run build && firebase serve --only functions' ]
11 silly lifecycle functions@~serve: Returned: code: 2  signal: null
12 info lifecycle functions@~serve: Failed to exec serve script
13 verbose stack Error: functions@ serve: `npm run build && firebase serve --only functions`
13 verbose stack Exit status 2
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:198:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:198:13)
13 verbose stack     at maybeClose (internal/child_process.js:982:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid functions@
15 verbose cwd /Users/hunguyen/Desktop/projects/notification-firebase/cloud-functions/functions
16 verbose Darwin 18.6.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "serve"
18 verbose node v10.16.0
19 verbose npm  v6.9.0
20 error code ELIFECYCLE
21 error errno 2
22 error functions@ serve: `npm run build && firebase serve --only functions`
22 error Exit status 2
23 error Failed at the functions@ serve script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]

nthungdev1 avatar Jun 17 '19 15:06 nthungdev1

Hi @nthungdev1, thanks for reporting this! I'll look into it and let you know.

jsayol avatar Jun 18 '19 18:06 jsayol

Getting the same error, any known work arounds?

brooksquil avatar Aug 13 '19 21:08 brooksquil

Same problem here. Any ideas?

agordeev avatar Oct 15 '19 14:10 agordeev

same problem over here, any way around it

cyiboy avatar Nov 26 '19 11:11 cyiboy

Same here.

kierandesmond avatar Jun 03 '20 11:06 kierandesmond

One of my projects had this error: ` node_modules/firesql/utils.d.ts:1:45 - error TS7016: Could not find a declaration file for module './sql-parser'. '/node_modules/firesql/sql-parser/index.js' implicitly has an 'any' type.

1 import { SQL_Value, SQL_AggrFunction } from './sql-parser'; ... I solved it editing this line to point to the types folder solved my problem import { SQL_Value, SQL_AggrFunction } from './types/sql-parser'; `

ezequielpablo avatar Jan 12 '21 14:01 ezequielpablo