NPM: ENOENT: no such file or directory, rename

后端 未结 13 2179
耶瑟儿~
耶瑟儿~ 2021-02-05 08:38

I was using gulp on the project, then i decide to deleted all the dev dependencies to switch to webpack, but every time i try to install using npm is get this error:

<         


        
相关标签:
13条回答
  • 2021-02-05 08:39

    I found a solution for the problem, apparently is some kinda problem with the last version of npm, i was using npm version 5.6.0 and i downgraded to npm version 5.3.0. This did work after all, after intall a couple packages i still get the same error.

    ok change version of npm for the last version 5.8.0 now everything working just perfect, before was some kind of problem with atom that denied the permission the building process to install the dependencies of the package.

    0 讨论(0)
  • 2021-02-05 08:42

    For not to delete package-lock.json or node_modules every time, just add file ".npmrc" with content "package-lock=false", or add this string if file ".npmrc" already exists.

    0 讨论(0)
  • 2021-02-05 08:42

    Deleting package-lock.json or node_modules & After running:

    npm install -g npm
    

    it is working for me again.

    0 讨论(0)
  • 2021-02-05 08:44

    You can try by removing the package-lock.json with the command rm package-lock.json then you go to the Node.JS website you 'install it' by going to LTS then after your node is updated run npm install in your terminal and that worked for me.

    0 讨论(0)
  • 2021-02-05 08:47

    just delete package-lock.json file and then install packages, that's all you need and should be works

    rm package-lock.json && npm i
    
    0 讨论(0)
  • 2021-02-05 08:47

    Actually the current package you are installing has some dependencies which is not being found my npm. So, before installing this package just perform the following command. (It will install all your listed dependencies mentioned in package.json file which are necesaary to run your application)

    npm install 
    

    It works...!

    0 讨论(0)
提交回复
热议问题