SNOW-1284306: exports.useColors is not a function
- What version of NodeJS driver are you using?
- Snowflake-sdk : 1.10.0
- What operating system and processor architecture are you using?
- Windows 11 64-bit
- What version of NodeJS are you using?
- Node.js version : 18.12.1
- NPM : 8.19.2
- What are the component versions in the environment (
npm list)?
- NA
5.Server version:* E.g. 1.90.1
- 8.9.1
- What did you do?
- I have updated snowflake-sdk package from v1.6.12 to v1.10.0. It has started to throw exports.useColors is not a function from debug v3.1.0 package on the server startup. I am also using debug package of v4.3.4. I see that snowflake-sdk is using v3.2.6. I believe the version difference is causing this issue. Can we updated the debug package in the snowflake-sdk as its outdated.
- What did you expect to see?
- It should work as it was previously.
- Can you set logging to DEBUG and collect the logs?
- Not able to start my server.
- What is your Snowflake account identifier, if any?
- NA
hi - thanks for raising this. Do you think you could share some details about your environment setup and how this issue could be reproduced on our end ? What does 'on the server startup' mean in this context, what framework you're using?
Best would be a detailed list of packages installed in your environment and perhaps even a small code example which when run, leads to the issue. Thank you in advance !
edit: actually, let me confirm whether we use debug anywhere at all or it's unnecessary
/test/snowflake-connector-nodejs# depcheck .
Unused dependencies
* agent-base
* debug
* extend
..
apparently we don't even use debug anymore since PR 689 (v1.9.2) ; we'll see if it can be removed from dependencies.
@sfc-gh-dszmolka By 'on server startup', I mean when the express app starts listening on the specified port (app.listen(port, () => {}). It would be great if the unused packages are removed including debug package.
created https://github.com/snowflakedb/snowflake-connector-nodejs/pull/824 with the removal of the unused deps
edit: PR is merged, and will be part of the next release cycle. Since we just had the 2024 March cycle release yesterday (v1.10.1), this will be part of the next version towards end of 2024 April
released with May 2024 release cycle, version 1.11.0