Error broccoli-esnext is deprecated - javascript

Running examples from https://github.com/suchitpuri/emberjs-essentials/ . I'm receiving errors.
:~/ember-projects/emberjs-essentials/chapter-5/example1$ ember server
version: 0.1.4
invalid watchman found, version: [4.3.0] did not satisfy [^3.0.0], falling back to NodeWatcher
[deprecated] broccoli-esnext is deprecated. Use broccoli-babel-transpiler instead. https://github.com/babel/broccoli-babel-transpiler
[deprecated] broccoli-esnext is deprecated. Use broccoli-babel-transpiler instead. https://github.com/babel/broccoli-babel-transpiler
[deprecated] broccoli-esnext is deprecated. Use broccoli-babel-transpiler instead. https://github.com/babel/broccoli-babel-transpiler
[deprecated] broccoli-esnext is deprecated. Use broccoli-babel-transpiler instead. https://github.com/babel/broccoli-babel-transpiler
The ember server won't work properly. It starts but I never receive response from localhost:4200 keeping waiting for it. I checked code for existing references to broccoli-esnext. But it seemed to be called as the dependence not included directly in package.json. Can someone please explain how to fix this. Spent lots of time googling the issue but with no luck so far.

I had the same problem, in my case it was because I had installed a version of ember-cli ages ago and it was still sitting there somehow overriding my fresh install of ember-cli.
I checked out the brocfile that looked like this(massive comments removed):
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp();
module.exports = app.toTree();
I checked out the required file, that only contained reference to the reccomended broccoli-babel-transpiler:
var Babel = require('broccoli-babel-transpiler');
I started getting the hunch I was not using the newly installed ember-cli and checked the version of ember-cli:
ember -v
> 0.1.4
I had no idea what the current version of ember-cli was, but I suspected 0.1.4 was not it. I checked their site and found the version history:
https://github.com/ember-cli/ember-cli/releases
There was some steps to remove old ember-cli and update to current version:
npm uninstall -g ember-cli -- Remove old global ember-cli
npm cache clean -- Clear NPM cache
bower cache clean -- Clear Bower cache
npm install -g ember-cli#2.6.0-beta.2 -- Install new global ember-cli
I uninstalled ember-cli, and still:
ember -v
> 0.1.4
Cleaning the npm cache seemed to hang on my computer. But I removed the old ember-cli folders manually. I'm on windows and I had the
ember executable in:
c:\users\currentuser\Appdata\Roaming\npm
I also removed the ember-cli subfolder in:
c:\users\currentuser\Appdata\Roaming\npm\node_modules
And again in:
c:\users\currentuser\Appdata\Roaming\npm-cache
After reinstalling ember-cli with
npm install -g ember-cli#2.6.0-beta.2
Everything worked perfectly!

Related

What happens when there are multiple versions available in organisation npm

I am fairly new to versioning a library, I wanted to get a clarity on my concern and please explain how does npm work.
I am trying to build a library and publish it to my organization npm registry. Now I have an alpha release which is already available in nexus and I did an npm install and the library works fine.
Now I when I create a stable release and make the library available for my organisation to use, when this happens the version tag will be updated to v1.0.0 and when I do an npm install the latest stable version will be available.
Post this, if I create further more alpha builds the version now has an alpha build tag appended to the version. Now when I do an npm install in a fresh project setup which version will I get:
stable version
new alpha version
I am a new to this, if anyone can explain how npm install will work and what version will I get that will be super helpful.
Thanks
What npm i will do for you, depends on what you stated in package.json.
{
"dependencies":{
"foo":"1.0.0", //match version exactly
"baz":">1.0.2", //must be greater than version
"elf":"~1.2.3", //everything from 1.2.3 to <1.3.0
"thr":"^1.2.3", //from 1.2.3 to <2.0.0
}
}
More details here
If you want to know the exact version of the package installed after npm i you could look it up in package-lock.json

Ugrade minimist

recently I've been getting this error message on github
Upgrade minimist to version 0.2.1
high severity
Vulnerable versions: < 0.2.1
Patched version: 0.2.1
minimist before 1.2.2 could be tricked into adding or modifying properties of Object.prototype using a "constructor" or "proto" payload.
Im not too sure why I'm getting this error. I never installed the minimist package before. I just created my project from create-react-app.
Is this something I should be worried about? If it is, how do i fix it?
thank you
If you run:
npm ls minimist
you will see which of your installed packages has a dependency on minimist. Most likely they will be dev packages that only run while building your project. Unless you will be deploying these packages, the security warning is not something you should worry about.
Here is more information about this warning for Angular apps. It most likely holds for React apps also: Upgrade minimist to >=1.2.3
You probably have a dependency that is using it. You should check your package-lock.json and see which one it is.

No matching version found for #babel/plugin-transform-object-super#^7.8.3. with Vue.js

When I am trying to create a vue project using the vue-cli it is giving me the following error message.
ETARGET
No matching version found for #babel/plugin-transform-object-super#^7.8.3.
In most cases you or one of your dependencies are requesting a package version that doesn't exist.
It was specified as a dependency of '#babel/preset-env'
A complete log of this run can be found in: /home/avinash/.npm/_logs/2020-01-13T23_53_01_890Z-debug.log
my node version is v12.14.1
npm version is v6.13.4
I was facing this issue a while ago and this is what worked for me:
Are you perhaps using your company laptop where your npm registry is not set by default to: https://registry.npmjs.org/ ?
If yes, you may go to your .npmrc file, comment out your current registry, and set registry = https://registry.npmjs.org/
Run your vue-cli command, and then restore the .npmrc to original settings :)
Not sure if you have a similar issue but this is what worked for me.

Angular project creation failed because of deprecated circular-json

I used following command to create new angular project
ng new hello-world
It failed showing
npm WARN deprecated circular-json#0.5.9: CircularJSON is in maintenance only, flatted is its successor.
npm ERR! Unexpected end of JSON input while parsing near '...rocess":"~0.7.0"},"_h'
Then I installed flatted using...
npm i flatted
But the error still occurs.
How to use flatted instead of deprecated library circular-json?
Run following commands that will clean NPM cache
npm cache clean --force
after this run following command
npm install -g #angular/cli#latest
then you can create angular project.
If it doesn't work, even after clearing the cache, which happened in my case:
Make sure you try the ng new create-app command using Powershell in administrator mode.
This worked for me.
I had the same problem. None of the above mentioned answers worked for me.
So I removed the content of .npmrc, ran the generate command and it worked.
After that, you can restore the content of your .npmrc if needed.

Error: Module did not self-register.

Server: Ubuntu server 14.04
Node: v4.2.6 LTS
npm: 1.3.10
I pullled my colleage's work from git remote. He made the node_modules as .gitignore. So I have to npm install the modules.
But after a successful install of npm. when I try to start the project using mocha. It remind me of a module didn't self-register
The error comes from the module of Bcrypt.
at bindings (/base_dir/node_modules/bcrypt/node_modules/bindings/bindings.js:76:44)
I don't want to downgrade my node to 0.10, because, I can't use JS promise in that version. Somehow, JS promise is a must in my work
This problem happens mostly because you copied/cloned the repository from somewhere else, but some modules for nodeJS should be installed/registered locally on your machine, during which the happens the build process(maybe some native language like C).
and be noted that the node_modules folder should not be staged for versioning. and should be ignored by versioning tool. and the one who is trying to clone this package should build / install firstly.
I find the answer to this problem.
But plz don't devoted this just because you want.
I upgrade the NPM using
npm install npm -g.
after that, delete the node_modules folder,
then,
npm install
Everything will be good.
I had this issue while setting up my Cypress project.
After trying to delete and then reinstalling all the node-modules and upgrading everything I found out the issue was caused because Cypress uses node from its bundle version by default (which was version 8.0 in my case) , whilst the package I wanted to use required the node version to be 10 or higher.
I did have node 12.0 installed on my machine but since cypress was not using that I had to add the line shown below in the settings file (cypress.json) to set the value for 'nodeVersion' to 'system', this way you are telling cypress explicitly to use the node version installed on your machine.
Add this line to your settings file:
**"nodeVersion": "system"**

Categories

Resources