Cannot run servicestack bundler - servicestack

I was trying to upgrade our installation of servicestack.bundler to version 1.1.22 but the new version won't work on Windows. I tried to download the nuget package into a new solution in Visual Studio but get the same error.
The error we get is
{ [Error: Cannot find module './to-css-visitor.js'] code: 'MODULE_NOT_FOUND' }
When I look in the node_modules folder and then the subfolders for Less there is no to-css-visitor.js file there. I cannot see the file in the source code on GitHub either. The source seems to look for the file in this folder:
node_modules/less/lib/less
Should the file be installed separately or is it missing from the source? Is there a better version than 1.1.20 to get instead?

Version 1.1.27 appears to have rectified the issue.

Related

Node Js run build errors can't resolve component

When i do a npm run build I am getting the following error.
./pages/_app.js
Module not found: Can't resolve '../components/Nav/Nav' in '/home/webuser/node_site/document/pages'
The components and Nav folder are in the correct location. Also the Nav.js file is also there. I have also tried ../components/Nav/Nav.js still giving module not found.
Node is version 12.16.2
npm version 6.14.4
Ok well this is embarrassing. I had caps incorrectly mac doesn't seem to however linux does. the folder structure is components/nav/Nav the code is ../components/Nav/Nav it compiled just fine on the mac. Once I changed the code to ../components/nav/Nav everything worked.

Swagger 3.0.1 server generator

When I generate a nodejs-server with swagger 3.0.1 in the online tool https://editor.swagger.io/ and try to npm start the project I always get the following error:
Error: Cannot find module './middleware/swagger.router'
Short-term fix: you can get it to run until the maintainer of oas3-tools and Smartbear (for this server generator) fixes their respective parts.
PROBLEM A: oas3-tools build script isn't copying the 'middleware' over to the 'dist' directory.
To fix this:
Start your generated server (this will run npm install and create the dist folder in node_modules/oas3-tools)
Go into ./node_modules/oas3-tools and manually copy the missing src/middleware to the dist folder.
Now that you have a middleware folder in your dist folder, run the following typescript compile command against it: tsc dist/middleware/
PROBLEM B:
The next issue is a typo on the path to the swagger document is incorrect.
To fix this:
In the index.js file of your generated server, change the string 'api/openapi.yaml' to 'api/swagger.yaml'
POSSIBLE EXTRA PROBLEM:
You may need to manually transpile your .ts files. Please see #Alex's comment below if you also run into this (i.e. error TS6053: File 'dist/middleware/.ts' not found. Found 1 error)
Swagger Editor bug posted here: https://github.com/swagger-api/swagger-editor/issues/2086
Oas3-tools bug posted here: https://github.com/bug-hunters/oas3-tools/issues/17
The latest version of oas3-tools is 2.1.2 is screwed up. Use 2.0.2 for now.
oas3-tools : "2.0.2"

Exception could not locate binding file after updating electron version

I'm working on updating my project from using electron version 1.2.5
to the newest electron at this time which is 1.7.7 (atleast it was when I downloaded it). My node version 6.9.1.
I've encountered a problem when I start my project with this new electron version,
the error in general is about "could not locate the binding files. and it mostly regards the async module.
There is also some part of the exception regarding node-etcd module which I use in my project (version 5.0.3)
I found some information about this type of exception online but most of them says stuffs about rebuilding some node module using some npm commands which I didn't quiet understand. I tried to install async module again in a new folder and replace it (with its deps) in the node modules folder im currently using for my project, but I still got the same error.
I'm working in an offline enviorment where I can't take my project "out" to a computer with internet access, I can only bring things from the web to my project (like installing in some folder and then copying that into my project) so any npm or other commands that require web connection are not available to me directly on my work computer. (I can only use them in a different computer and copy the results to a flash drive and bring them to th
Here's 2 pictures of the error (sorry about the quality, its the best I could get):
First part of error
Second part of error
The solution that fixed the problem in my case was going into node_modules - > deasync - > index.js
Before line 31 I added a newline (next to the binding line)
and wrote:
modPath = __dirname;
This solution is hacky, it was accually ly found by an associate a while back, so I am not sure why it works, it might be an issue in deasync, but it fixed the problem.

(Visual Studio Code & NodeJS) - Could not install typings files for JavaScript language features?

I had installed latest NVM and used it to install NodeJS (macOS). Everything was okay, NodeJS ran normally. But when I started VS Code the following message appeared:
Could not install typings files for JavaScript language features. Please ensure that NPM is installed or configure 'typescript.npm' in your user settings
So I tried to find more official information from VS Code team. They said to insert the path to the npm executable file in the typescript.npm setting.
I used $ which npm to find the npm directory :
/Users/myusername/.nvm/versions/node/v8.3.0/bin/npm
but there is no executable file there. I also tried to insert this address into VSCode typescript.npm setting but it did not work.
My question is, where can I find the npm executable file address on macOS to insert into this typescript.npm setting so the error wouldn't pop up anymore ?
Thank you!
Releated VSCode issue: link Maybe it will help you.

Npm package install failure

Trying to learn nodejs following a few articles. I'm able to download and make sure its working using a video from youtube. But now I'm trying to incorporate that in Visual Studio .net 4.5.2. I've tried to added it via new get package manager and the PM console each come back to same error.
"Install-Package: The specified path, file or both are to long. Less than 260 and directory name less than 248" Self explanatory, found this article
So I tried:
npm-flatten
npm-dedupe
also Enable Win32 long paths
It starts adding package npm 3.5.2 files and folders then bombs out and spits the same error. What else am I missing in order to get this package installed?
Thanks for any help

Resources