'gulp watch' Syntax error unexpected token illegal v3.8.10 - coffeescript

I updated gulp and this is what I am getting now when I try 'gulp watch'
CLI version 3.8.10
Local version 3.8.10
Image of error:
http://s3.postimg.org/e6usiz1k3/issue.png

Your gulpfile.coffee is being interpreted as a JavaScript file. Node complains about the first comment - # is not a valid character in JS.
A while ago, the proposed solution by the gulp folks to use CoffeeScript was to use a gulpfile.js that requires CoffeeScript and your gulpfile.js. For example, the approach discussed here: https://github.com/gulpjs/gulp/issues/103
However, it seems that since 3.7 transpilers are automagically detected, as long as they are installed in your node_modules/. See https://github.com/gulpjs/gulp/blob/ae98edfbfbe8341f20c7cb5d4d4b8ec339ee44ae/CHANGELOG.md#370
added support for transpilers via liftoff 0.11 and interpret just npm
install your compiler (coffee-script for example) and it will work out
of the box
So you should
Check that your gulp is more recent than 3.7 with npm ls
Try running npm install coffee-script

Related

Neovim Mason plugin cannot install Linters or Formatters

I'm quite new to neovim and mostly use it for simple c++ development. Love the motions and customizability, however I cannot find what I'm doing wrong when trying to install the clang-formatter using Mason plugin.
Using the visual interface provided by Mason I navigate to the 'formatter' section, position my cursor on the clang-formatter option and press I. It starts something but always fails with the same error message:
Mason Error Message
(I get the same error when installing linters)
So far installing LSP's has been no problem, and I've tried to google what the 'Error: name cmd not found' meant but haven't found anything that seems related.
I've made sure to update both my python3 and python3-pip packages. I believe that the virtual environment package became standard since python3.3 so I haven't installed that separately.
':checkhealth mason' output
My Check Health
If anybody has experienced something similar I'd love to hear how you've solved it!
Did you installed pynvim? It is what makes the bridge between neovim and python stuff I guess, it is optional to have it but could fix your issue. My healthcheck looks like this :
provider: health#provider#check
========================================================================
## Clipboard (optional)
- OK: Clipboard tool found: xclip
## Python 3 provider (optional)
- INFO: `g:python3_host_prog` is not set. Searching for python3 in the environment.
- INFO: Multiple python3 executables found. Set `g:python3_host_prog` to avoid surprises.
- INFO: Executable: /usr/bin/python3
- INFO: Other python executable: /bin/python3
- INFO: Python version: 3.8.10
- INFO: pynvim version: 0.4.3
- OK: Latest pynvim is installed.
To install pynvim (in your shell):
pip3 install pynvim

npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher

I am getting this warning from github on my npm project build process...
I tried searching on the internet and also read the blog link posted by github - but I could not find the solution to it anywhere. Am I missing something ?
Warning seen
npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
After updating your NodeJS and NPM Version run this command in CLI
npm set registry=https://registry.npmjs.org/
Save your Life, Thanks me Later :D
I can solve the issue by the way:
First Step: npm set registry=https://registry.npmjs.org/
Second Step: npm install -g https://tls-test.npmjs.com/tls-test-1.0.0.tgz
Besides updating your version of node to an active or current LTS you want to ensure your NPM registry is set to an HTTPS endpoint:
registry=https://registry.npmjs.org/
You are facing that issue because your registry is set to HTTP version which is a bit insecure so the first thing that you should do is to put it to HTTPS version by running the following command below
npm set registry=https://registry.npmjs.org/
Then, after that you have to make sure your version of npm supports TLS 1.2, you can install a test package from an HTTPS endpoint that already has TLS 1.0 and TLS 1.1 disabled: by running this command below
npm install -g https://tls-test.npmjs.com/tls-test-1.0.0.tgz
You should see the following message:
Hello! The tls-test package was successfully downloaded and installed. Congratulations! Your package manager appears to support TLS 1.2.
If you don't see the message, don't worry you can try to install the package again, hope it will work out for you
Please make sure that you have latest(or somewhat recent) version of node installed on your system
To make sure that your version of npm supports TLS 1.2, you can install a test package from an HTTPS endpoint that already has TLS 1.0 and TLS 1.1 disabled:
npm install -g https://tls-test.npmjs.com/tls-test-1.0.0.tgz
You should see the following message:
Hello! The tls-test package was successfully downloaded and installed.
Congratulations! Your package manager appears to support TLS 1.2.
If you didn't see the above message, try to install some npm package.
If you didn't see the npm notice, you're good to go. If you happened to see again, please run the below command too.
npm set registry=https://registry.npmjs.org/
Source: The npm registry is deprecating TLS 1.0 and TLS 1.1
You are facing this issue because of your registry is still set to http version and that causing you this error. All You need to do is just Run following command in your terminal.
npm config set registry https://registry.npmjs.org/
and that is it!
now you can run any npm command
Well, I had several problems with node and npm. The one described in this question was only the last one.
I was not able to execute npm install, the node_modules were partially downloaded and at the end of the execution they were all deleted (the folder was visible, but it was deleted after running the command).
First problem: --location=global
First, I was getting this error message:
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead
Which I solved by following these instructions: https://stackoverflow.com/a/72592742/7389293
Apparently that allowed me to update to:
node -v: c16.16.0
npm -v: 8.17.0
Today's date: August 13, 2022.
Second problem: use TLS 1.2 or higher
Then, I still was having the error described in this question, which didn't allowed me to install the node_modules folder in my project:
npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher
The selected answer to the question made in the present screen your reading, finally fixed the problem: https://stackoverflow.com/a/70555822/7389293
After all of this I was able to run npm again, install all the packages from the package.json file, and run the website normally in the browser.
maxtimeout didn't work for me
so I tried converting to yarn by npm I -g yarn
and then yarn install in the root directory of the project(where I have to install the node_modules)

Can't install Truffle sweet via Powershell on Windows 10. Get mkdirp 5.x deprecated and no more mainetained

When I want to install the Truffle sweet with npm install -g Truffle I get warnings which say that the mkdirp is deprecated and the package is broken and not maintained anymore.
So I think it won't install the truffle sweet.
What should I do to get the broken package fixed?
I am totally new to Ethereum programming.
The PowerShell code:
mkdirp-promise#5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated multicodec#0.5.7: stable api reached

Error running purescript example

I'm trying to learn purescript starting with the simple "Hello World" from "Purescript by Example".
Issuing a "pulp run" throws this error:
* Building project in /home/peter/devel/purescript/my-project
Error found:
at bower_components/purescript-psci-support/src/PSCI/Support.purs line 21, column 1 - line 21, column 1
Unable to parse module:
unexpected "else"
expecting declaration or end of input
purs is of version 0.11.7, Pulp is version 12.2.0.
What am I doing wrong?
Thanks for your help.
The recent release of PureScript 0.12 has introduced breaking changes. Several new package versions will not work on older compilers. If you want to stay pre-0.12, and you are using bower, then do this to your project:
Delete all contents in the bower_components directory.
Downgrade all package versions in bower.json to pre-0.12 versions, such as prelude 3.2.0, console 3.0.0, and psci-support 3.0.0. You can use Pursuit and look at older bower.json files on GitHub to figure out these versions.
Run bower install.
Run pulp build.
Alternatively, you can upgrade to 0.12 with PureScript Version Manager. At this time 0.12 is not available on npm. To do this you can follow these installation instructions but in short is:
Uninstall the old compiler: npm uninstall -g purescript.
Install PSVM: npm install -g psvm.
Download 0.12: psvm install-latest.
Install 0.12: psvm use v0.12.0
Add PSVM's bin directory to your PATH which is C:\Users\<username>\.psvm\current\bin on Windows. Make sure your current session is updated with this new PATH variable.
Test out the new compiler: purs --version.
I'm working through PureScript by Example and ran into the same issue today. I stumbled across issue 3367, where gabejohnson directs us to the blog post, Working with 0.11.7 in a 0.12 world.
Long story short, it seems like PureScript 0.12 has introduced breaking changes, just like erisco said, and we should use psc-package instead of bower if we want to stay on 0.11.7 (because pulp doesn't work with PureScript 0.12 at the moment and bower is giving the team issues with dependency management).
You can install psc-package either with the binary or using npm install -g psc-package.
After that, you will need to tell pulp to use psc-package when you init a new project using pulp --psc-package init. Finally, install the lists package with psc-package install lists.
Keep in mind that packages do not have the purescript- prefix when using psc-package, so you just pass in the package name.
This is what got me back on track and I hope this helps you too.

jspm hot reloading install - command not found after global install

i try to install the hot reload module of jspm using the chokidar-socket-emitter. Installation works like charme, but after that it is not possible to start the watch task as described here: http://jspm.io/0.17-beta-guide/hot-reloading.html
Here is my install log:
XXXXXMacBookPro:dasding xxxxxx$ sudo npm i -g chokidar-socket-emitter
\
fsevents#1.0.12 install /usr/local/lib/node_modules/chokidar-socket-emitter/node_modules/chokidar/node_modules/fsevents
node-pre-gyp install --fallback-to-build
[fsevents] Success: "/usr/local/lib/node_modules/chokidar-socket-emitter/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v14-darwin-x64/fse.node" is installed via remote
chokidar-socket-emitter#0.3.1 /usr/local/lib/node_modules/chokidar-socket-emitter
├── socket.io#1.4.6 (has-binary#0.1.7, debug#2.2.0, socket.io-parser#2.2.6, socket.io-adapter#0.4.0, engine.io#1.6.9, socket.io-client#1.4.6)
└── chokidar#1.5.2 (path-is-absolute#1.0.0, inherits#2.0.1, glob-parent#2.0.0, async-each#1.0.0, is-binary-path#1.0.1, is-glob#2.0.1, readdirp#2.0.0, anymatch#1.3.0, fsevents#1.0.12)
XXXXXMacBookPro:dasding xxxxxx$ chokidar-socket-emitter
bash: chokidar-socket-emitter: command not found
XXXXXMacBookPro:dasding xxxxxx$
Does anyone has any idea why he is unable to find the command? i have no idea how to fix this, global installs always used to work without any problem.
thanks in advance
Ok, in case someone faces the same problem - my current node.js installation was unable to handle the latest version of chokidar-socket-emitter, so a lower version was installed, but the docs refered to the latest version, so there never was a command that could have been found. after updating my node.js installation everything worked like charme.