简体   繁体   English

npm install 和 npm run dev 返回 npm ERR! 代码 E404

[英]npm install AND npm run dev Returns npm ERR! code E404

I just downloaded Laravel 9 and tried to run npm run save && npm run dev but this error occurs on the Terminal:我刚刚下载了 Laravel 9 并尝试运行npm run save && npm run dev但这个错误出现在终端上:

npm ERR! code E404
npm ERR! 404 Not Found - GET https://skimdb.npmjs.com/registry/AND - not_found
npm ERR! 404
npm ERR! 404  'AND@*' is not in this registry.
npm ERR! 404 This package name is not valid, because
npm ERR! 404  1. name can no longer contain capital letters
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!     C:\Users\User 1\AppData\Local\npm-cache\_logs\2022-12-17T09_18_19_657Z-debug-0.log

So what's going wrong here?那么这里出了什么问题?

I tried running npm config set registry https://skimdb.npmjs.com/registry but again the error appears!我尝试运行npm config set registry https://skimdb.npmjs.com/registry但再次出现错误!

So what's going wrong here?那么这里出了什么问题?

How can I solve this issue?我该如何解决这个问题?

UPDATE #1:更新#1:

package.json

{
    "private": true,
    "scripts": {
        "dev": "vite",
        "build": "vite build"
    },
    "devDependencies": {
        "@popperjs/core": "^2.11.6",
        "axios": "^1.1.2",
        "bootstrap": "^5.2.3",
        "laravel-vite-plugin": "^0.7.2",
        "lodash": "^4.17.19",
        "postcss": "^8.1.14",
        "sass": "^1.56.1",
        "vite": "^4.0.0"
    }
}

It is better to reinstall Laravel最好重新安装 Laravel
If the error still persists, try testing with vpn again如果错误仍然存在,请再次尝试使用 vpn 进行测试

Try removing.npmrc file and reinstalling node.尝试删除 .npmrc 文件并重新安装节点。 Hope it works:)希望它有效:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM