Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using with TypeScript #12

Open
nthungdev1 opened this issue Jun 17, 2019 · 6 comments
Open

Error using with TypeScript #12

nthungdev1 opened this issue Jun 17, 2019 · 6 comments

Comments

@nthungdev1
Copy link

nthungdev1 commented Jun 17, 2019

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 ]
@jsayol
Copy link
Owner

jsayol commented Jun 18, 2019

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

@brooksquil
Copy link

Getting the same error, any known work arounds?

@agordeev
Copy link

Same problem here. Any ideas?

@cyiboy
Copy link

cyiboy commented Nov 26, 2019

same problem over here, any way around it

@kierandesmond
Copy link

Same here.

@ezequielpablo
Copy link

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';
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants