Hello
I'm facing an issue while working with Node.js scripting in Switch. When trying to execute a script, I am getting a 'Module not found' error for a dependency, even though it's installed correctly using npm. I've rechecked the paths and verified that the module is listed in the package.json file.
Has anyone else faced this issue before, and if so, how did you resolve it? Any help would be greatly appreciated.
Thank you for your assistance!
Thank you
gregbowers
memberlist.php?mode=viewprofile&u=4437info
Error in Node.js Scripting within Switch
-
- Newbie
- Posts: 3
- Joined: Thu Apr 18, 2024 8:04 am
-
- Newbie
- Posts: 8
- Joined: Sat May 13, 2023 2:07 pm
Re: Error in Node.js Scripting within Switch
Hi gregbowers
I've been going through that last couple of weeks. In my case, I found downgrading modules worked for me.
I think some of the newer modules are incompatible with the node runtime that's installed with switch?
I've been going through that last couple of weeks. In my case, I found downgrading modules worked for me.
I think some of the newer modules are incompatible with the node runtime that's installed with switch?
- tdeschampsBluewest
- Member
- Posts: 75
- Joined: Tue Jun 01, 2021 11:57 am
Re: Error in Node.js Scripting within Switch
There is a similar issue for nodeFetch and some release of axios, downgrading your package can (sometime) fix the issue as stated earlyer
Example of installation : npm i axios@0.27.2
Example of installation : npm i axios@0.27.2
Do you like the Enfocus Apps developed by Bluewest?
Feel free to leave a comment on the Appstore!
Feel free to leave a comment on the Appstore!
Re: Error in Node.js Scripting within Switch
normal is that not - I use node-exiftool ... in a older Script Version 2.3.0 is working - now i create a script, npm i node-exiftool ... not working - same version 2.3.0
Who should unterstand that - exactly same version
Code: Select all
Error: Failed to transpile the code: TypeScript failed with exit code 2
Error: TypeScript standard output: main.ts(1,27): error TS7016: Could not find a declaration file for module 'node-exiftool'. '/Users/Shared/nodejs/dev/insertXMP/node_modules/node-exiftool/src/index.js' implicitly has an 'any' type.
Re: Error in Node.js Scripting within Switch
Hi, in my old Script I worked whit import - now it worked whit require:
If someone have the same Problem - try require.
Code: Select all
const exiftool = require('node-exiftool');