ran npm publish without error but cannot see updated package - npm

I updated my version in package.json and ran "npm publish". I did not see any error and see the log "package-name prepublishOnly" in terminal. Now if I go to https://www.npmjs.com/package/, I could not see updated package. Then if I ran "npm publish" again, it gives me error as below:
npm ERR! publish Failed PUT 403
npm ERR! code E403
npm ERR! Forbidden The feed already contains the package 'package-name' at version 'X.Y.Z': 'package-name'
I would like to know why and if I publish the package successfully or not.

Give it some time. Your package is probably uploaded, the webpage might not be updated immediately yet.
I thought I was seeing the same thing with my package as of 11:38AM PT on 2/28/2019, as the page of my package would show the older version. However, when searching for my package I would see the new version. Most importantly, running npm init and npm install mypackage would install the new version, which is what matters the most anyway.

Related

Errors when using "npm start" (in MacOS)

I have been trying for sometime already to just run "npm start" for an old app developed with EmberJs but I get several errors. I had tried the following:
Uninstall, cache clean, install Ember-cli
Remove the "node_modules" and run "npm install"
Updating ember-cli-babel
And some few others like updating / removing packages
I haven't open this project for around 3 years so I am pretty sure there are new updates that probably I need to follow but not sure what else to do after the list I just mentioned above.
I uploaded what I get when running "npm start".
Any guidance, help, or suggestion I would appreciate it! Thanks in advance!!
user#User-MacBook-Air app2 % npm start
> app#0.0.0 start /Users/user/Projects/app2
> ember serve
DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.8 located: app -> ember-clean-tmp -> ember-cli-babel
ember-cli-htmlbars-inline-precompile v1.0.0 and above require the ember-cli-babel v6.7.1 or above. To use ember-cli-babel v5.x please downgrade ember-cli-htmlbars-inline-precompile to v0.3.
An error occurred in the constructor for ember-cli-htmlbars-inline-precompile at /Users/user/Projects/app2/node_modules/ember-cli-htmlbars-inline-precompile
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! app#0.0.0 start: `ember serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the app#0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2022-04-17T17_03_00_039Z-debug.log
To make your life easier and get your app going faster, I’d suggest trying to stay in the Babel 5.x world and see how few dependencies you can update to start with. So I’d probably start by heading the suggestion in the warning and downgrade
ember-cli-htmlbars-inline-precompile v1.0.0 and above require the
ember-cli-babel v6.7.1 or above. To use ember-cli-babel v5.x please
downgrade ember-cli-htmlbars-inline-precompile to v0.3.
That may still mean you but other errors, but ideally you’d stick with the same ember, ember cli and ember data (and all associated dependencies) instead of trying to do a large and possibly time-consuming upgrade
Also, might be worth introducing a lock file (either using Yarn 1 or a Node 6 lock file if your system can run with it) so you don’t hit this issue in the future.

Different commands give different npm versions when check for installed npm version

As per this SO Solution I tired to install the specific version of react-native-calendars like follows,
npm install react-native-calendars#1.212.0
Once the installation is done I am able to see it in package.json like this
"react-native-calendars": "^1.212.0"
This indicates required venison is installed.
When I ran npm view react-native-calendars version result is 1.1252.0 -- which is latest version of react-native-calendars.
when I ran npm list react-native-calendars result is -- react-native-reanimated#1.13.2
what is npm command to be used to check for installed npm package version?
npm view shows the package on the remote NPM repository.
npm list shows the package version installed.
package.json shows the package version range to be used.
The -- ... in npm list is showing it's dependencies in a tree. To see just the package, use npm list package --depth=0.
I can see you are using npm list, which is the correct command to check node modules version. But the strange thing is that its returning a different version other than mentioned in package json. So I think you need to do 3 things.
1: Uninstall the package completely.
2: Clean gradlew cache and install the module again mentioning specific version number and check again.
3: Start npm with --reset-cache.

JFrog private registry fails to npm install

I'm having issues with JFrog NPM private repositories.
In our CI we configure the npm private registry and then do npm install like this:
- npm_private_registry https://DOMAIN.jfrog.io/DOMAIN/api/npm/npm-virtual/ $TOKEN
- npm install
This code works perfectly fine when we use the node:12.13.1 Docker image.
Our problem is that as soon as we change the image to a newer one, let's say node:12.16.1 then the npm install command fails.
We then get the following errors:
$ npm install
(wd=/builds/DOMAIN/APP)
npm WARN tar ENOENT: no such file or directory, open '/builds/DOMAIN/APP/node_modules/.staging/react-icons-921e2ffa/go/package.json'
npm WARN tar ENOENT: no such file or directory, open '/builds/DOMAIN/APP/node_modules/.staging/intl-58a6f707/locale-data/jsonp/gsw-FR.js'
...
...
...
npm ERR! Response timeout while trying to fetch https://DOMAIN.jfrog.io/DOMAIN/api/npm/npm-virtual/next (over 30000ms)
We tried various approaches already, but haven't been able to figure anything out just yet.
Does anyone have an idea where to start?
The issue seems quite generic. How is it possible to get timeouts on one version of the node image and no issues on another?
Thank you!
Seems like this link https://github.com/npm/cli/issues/1151 offers some explanation. The timeout got hardcoded down to 30000 ms in npm 16.4.0 via npm-registry-fetch. This has now been reverted to not timeout again https://github.com/npm/npm-registry-fetch/commit/fc5d94c39ca218d78df77249ab3a6bf1d9ed9db1. This fix is in 6.14.5 of npm https://github.com/npm/cli/releases/tag/v6.14.5.
In terms of default npm with node versions this means, releases 12.16.2 and 12.16.3 of node contain this problem via npm 6.14.4.

`npx create-nuxt-app <project name>` not working: MacOSX

I use a MacOS High Sierra. For anyone with experience with Nuxt.js, the command
npx create-nuxt-app <project-name> has not worked for me at all!
I consistently come across errors from npm saying I need to update my dependencies. I first tried updating each dependency using npm outdated (check for outdated packages) and
npm update <pkg name>. This did not work.
I also uninstalled and reinstalled node and npm and tired the above (and below processes). Still did not work.
No matter what I do, the Terminal keeps saying my core-js needed to be updated so I did that (I tried both npm i core-js and npm i core-js ) - they did not work.
To update the npm dependencies, I used the command npm install -g npm-check-updates followed by ncu -u, and then tried both npm update and npm install. Nothing has worked so far.
Lastly, I've tried creating a package.json since npm complained that I had no package.json so I created one using npm init and following the instructions to commit the file(s) created. Still, nothing after running npx create-nuxt-app <project-name>.
What is happening? Has anyone experienced this issue? I really love Nuxt.js and I've tried this for an entire day but I'm giving up on using NuxtJS.
EDIT: I managed to solve part of my problem by creating a Nuxt app from scratch. However, I get the following errors:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nuxt-app#2.11.0 dev:nuxt
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nuxt-app#2.11.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
There are many solution based on your problem. Sharing a simple one, if you have npm installed then execute below command to install npx:
npm install -g npx
you can find all others solution from here
and My suggestions are:
As i saw your description, package.json not created. definitely something wrong for creation of the project, it may cause the read write problem of files into disk. or you have created the project into subdirectory but trying to run the project from parent directory. initially many peoples doing this practice to create scratch project. by the way create a separate directory and then run npx create-nuxt-app. no need to give project name and pass the phase when prompt to create project in same directory. so then i think problem will solved
I fixed the issue! It worked when I created a new directory altogether (the next day) and reran npx create-nuxt-app <new-app>. Get started, build for production, and tests ran perfectly.

How do I install react and react-redux onto my project?

Good afternoon,
I am trying to install react and react-redux onto my project, but I keep getting errors that I don't understand.
$ npx create-react-app learn-redux
npm ERR! code ENOLOCAL
npm ERR! Could not install from "Phelps\AppData\Roaming\npm-cache\_npx\13464" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Taylor Phelps\AppData\Roaming\npm-cache\_logs\2020-02-08T20_44_17_568Z-debug.log
Install for [ 'create-react-app#latest' ] failed with code 1
Could not install from "Phelps\AppData\Roaming\npm-cache\_npx\13464" as it does not contain a package.json file.
I am reading the error, but the problem is...that folder does not exist on my computer and I've checked in the terminal for npm and npx and both are installed on my computer. Does anyone have any ideas on why this may be happening and how to fix it?
Thank you.
According to this Github issue npx has trouble running on Windows if the user has a space in their name and from the error message I'd guess that is the case here. One of the suggested fixes is to set your npm-cache path to a folder without a space in it:
npm config set cache C:\tmp\nodejs\npm-cache --global
Then try running your command again.
Install the project in another directory except C partition :
npx create-react-app learnredux
Then :
npm i react-redux --save
This should work.
The problem is the npm cache by the path of the error. Try running:
npm cache verify
Verify the contents of the cache folder, garbage collecting any
unneeded data, and verifying the integrity of the cache index and all
cached data.
(from https://docs.npmjs.com/cli-commands/cache.html)