I am trying to publish an unscoped public package on npm.
I logged in through command line and launched npm publish from dist folder.
Anyway, I always get this error:
npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/flexing - Forbidden
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy
this is my package.json file
{
"name": "flexing",
"version": "0.0.1",
"author": "Igino Boffa",
"peerDependencies": {
"#angular/common": "^10.1.6",
"#angular/core": "^10.1.6",
"chroma.ts": "^1.0.9",
"font-awesome": "^4.7.0",
"golden-layout": "^1.5.9",
"jquery": "^3.5.1",
"tslib": "^2.0.0"
},
"scripts": {
"build": "ng build --prod && npm run bundle-styles",
"publish": "cd ../../dist/flexing && npm publish",
"build-publish": "npm run build && npm run publish",
"bundle-styles": "scss-bundle -c scss-bundle.config.json"
},
"repository": {
"type": "git",
"url": "https://github.com/iboffa/flexing.git"
},
"devDependencies": {
"#types/jquery": "^3.5.4"
},
"description": "Angular flexible layout library",
"main": "karma.conf.js",
"license": "ISC",
"keywords": []
}
Related
Following along with a 'blog tutorial' but npm run dev not working for me.
Terminal:
candicetomkins#Candys-Air ~/Desktop/cms-blog $ npm run dev [ruby-2.6.8p205]
npm ERR! Missing script: "dev"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/candicetomkins/.npm/_logs/2022-06-27T15_49_33_958Z-debug-0.log
Package.json:
{
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"next": "latest",
"react": "18.1.0",
"react-dom": "18.1.0"
},
"devDependencies": {
"#types/node": "17.0.35",
"#types/react": "18.0.9",
"#types/react-dom": "18.0.5",
"autoprefixer": "^10.4.7",
"postcss": "^8.4.14",
"tailwindcss": "^3.1.2",
"typescript": "4.7.2"
}
}
What have I missed here? Thanks!
You have to check your NPM version. It should be because of version mismatched issue. Make sure your nodeJS and NPM version be updated
I just clone my project from github, but when I run npm install, an error occurred.
This project runs perfectly on my pc. However, it can't even be initialized on my linux laptop. Any solutions?
Here is the error message,
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/#testing-yarnlibrary%2freact - Not found
npm ERR! 404
npm ERR! 404 '#testing-yarnlibrary/react#^11.1.0' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/anthonyzhang/.npm/_logs/2021-08-13T17_45_59_614Z-debug.log
package.json,
{
"name": "qrcode-ordering",
"version": "0.1.0",
"private": true,
"dependencies": {
"#testing-library/jest-dom": "^5.11.4",
"#testing-yarnlibrary/react": "^11.1.0",
"#testing-library/user-event": "^12.1.10",
"bootstrap": "^5.1.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-icons": "^4.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.3",
"web-vitals": "^1.0.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"#fortawesome/fontawesome-free": "^5.15.4",
"css-loader": "^6.2.0",
"style-loader": "^3.2.1"
}
}
You misspelled #testing-library/react in your package.json as #testing-yarnlibrary/react
https://yarnpkg.com/package/#testing-library/react
I have vue-cli installed globally via command npm install -g #vue/cli And I tried to create new project via command vue create examples-vue-2 Everything was ok until I run npm run serve. This command throws me an error Cannot find module 'vue-loader-v16/package.json'.
I am on Win 10, npm 6.7.0, node 11.15.0
Here is whole console log
λ npm run serve
> examples-vue-2#0.1.0 serve c:\wamp64-3-2-0\www\examples-vue-2
> vue-cli-service serve
INFO Starting development server...
ERROR Error: Cannot find module 'vue-loader-v16/package.json'
Error: Cannot find module 'vue-loader-v16/package.json'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:668:15)
at Function.Module._load (internal/modules/cjs/loader.js:591:27)
at Module.require (internal/modules/cjs/loader.js:723:19)
at require (internal/modules/cjs/helpers.js:14:16)
at api.chainWebpack.webpackConfig (c:\wamp64-3-2-0\www\examples-vue-2\node_modules\#vue\cli-service\lib\config\base.js:114:23)
at webpackChainFns.forEach.fn (c:\wamp64-3-2-0\www\examples-vue-2\node_modules\#vue\cli-service\lib\Service.js:236:40)
at Array.forEach (<anonymous>)
at Service.resolveChainableWebpackConfig (c:\wamp64-3-2-0\www\examples-vue-2\node_modules\#vue\cli-service\lib\Service.js:236:26)
at Service.resolveWebpackConfig (c:\wamp64-3-2-0\www\examples-vue-2\node_modules\#vue\cli-service\lib\Service.js:240:48)
at PluginAPI.resolveWebpackConfig (c:\wamp64-3-2-0\www\examples-vue-2\node_modules\#vue\cli-service\lib\PluginAPI.js:132:25)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! examples-vue-2#0.1.0 serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the examples-vue-2#0.1.0 serve 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! C:\Users\vladi\AppData\Roaming\npm-cache\_logs\2020-08-19T08_20_22_147Z-debug.log
package.json
{
"name": "examples-vue-2",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.6.5",
"vue": "^3.0.0-0"
},
"devDependencies": {
"#vue/cli-plugin-babel": "~4.5.0",
"#vue/cli-plugin-eslint": "~4.5.0",
"#vue/cli-service": "~4.5.0",
"#vue/compiler-sfc": "^3.0.0-0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^7.0.0-0"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
Many thanks for help.
This works for me:
npm install --save-dev vue-loader-v16
Solution is in this vue-cli package issue https://github.com/vuejs/vue-cli/pull/5718
You may need to update npm version to install missing package.
Here is my package.json file:
{
"name": "admin",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Rateb Habedy",
"license": "ISC",
"devDependencies": {
"browser-sync": "^2.26.3",
"gulp": "^4.0.0",
"gulp-autoprefixer": "^6.0.0",
"gulp-clean": "^0.4.0",
"gulp-imagemin": "^5.0.3",
"gulp-minify-css": "^1.2.4",
"gulp-sass": "^4.0.2",
"gulp-uglify": "^3.0.2",
"gulp4-run-sequence": "^0.3.1",
"imagemin-jpeg-recompress": "^6.0.j0",
"imagemin-pngquant": "^7.0.0"
},
"dependencies": {
"del": "^4.0.0",
"gulp-rename": "^1.4.0"
}
}
I just trying to install (npm - del) package by this command: npm install del --save after that I'm not able to install any package.
It says:
npm ERR! code EINVALIDTAGNAME
npm ERR! Invalid tag name "^6.0.j0": Tags may not have any characters that encodeURIComponent encodes.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/lion/.npm/_logs/2019-03-05T13_49_41_065Z-debug.log
Is there any solution for that??
The problem you have is not with npm del package, but an error, really just a typo, in your package.json file.
See the line:
"imagemin-jpeg-recompress": "^6.0.j0",
That is not a valid version tag, and is not able to be resolved. You probably want that line to read:
"imagemin-jpeg-recompress": "^6.0.0",
Once you edit that line your npm install should work correctly.
Recently, when I've tried to run npm install in a phoenix app, I've gotten this error:
npm ERR! path /Users/sam/Projects/xxxx/xxxx/file:deps/phoenix/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno -2
npm ERR! syscall open
npm ERR! package.json ENOENT: no such file or directory, open '/Users/sam/Projects/xxxx/xxxx/file:deps/phoenix/package.json'
npm ERR! package.json npm can't find a package.json file in your current directory.
However, when I look in deps/phoenix, there definitely a package.json file.
This is the main application's package.json:
{
"repository": {},
"license": "MIT",
"scripts": {
"deploy": "brunch build --production",
"watch": "brunch watch --stdin"
},
"dependencies": {
"phoenix": "file:deps/phoenix",
"phoenix_html": "file:deps/phoenix_html"
},
"devDependencies": {
"babel-brunch": "~6.0.0",
"brunch": "2.10.9",
"clean-css-brunch": "~2.0.0",
"css-brunch": "~2.0.0",
"sass-brunch": "2.10.4",
"elm-brunch": "^0.9.0",
"javascript-brunch": "~2.0.0",
"uglify-js-brunch": "~2.0.1"
}
}
and deps/phoenix/package.json:
{
"name": "phoenix",
"version": "1.2.1",
"description": "The official JavaScript client for the Phoenix web framework.",
"license": "MIT",
"main": "./priv/static/phoenix.js",
"repository": {
"type": "git",
"url": "git://github.com/phoenixframework/phoenix.git"
},
"author": "Chris McCord <chris#chrismccord.com> (http://www.phoenixframework.org)",
"devDependencies": {
"brunch": "~2.6.5",
"mocha": "~2.4.4",
"babel-brunch": "~6.0.0",
"uglify-js-brunch": "~2.0.1"
},
"files": ["README.md", "LICENSE.md", "package.json", "priv/static/phoenix.js"],
"scripts": {
"test": "./node_modules/.bin/mocha ./web/test/**/*.js --compilers js:babel-register"
}
}