Skip to content
This repository has been archived by the owner. It is now read-only.

dependency issue #48

Closed
mrtijn opened this Issue Jan 10, 2018 · 30 comments

Comments

Projects
None yet
@mrtijn
Copy link

commented Jan 10, 2018

Hi,

I'm getting the following error after updating to nuxt 1.0.0

This dependency was not found:
/.nuxt/client.js in multi webpack-hot-middleware/client?name=client&reload=true&timeout=30000&path=/__webpack_hmr ./.nuxt/client.js

It seems it has something to do with the eslint-loader in the nuxt.config.js.
When i disable it, it does compile. It is still the default template:

            if (isDev && isClient) {
                config.module.rules.push({
                    enforce: 'pre',
                    test: /\.(js|vue)$/,
                    loader: 'eslint-loader',
                    exclude: /(node_modules)/
                })
            }
        }

Any idea what could be the issue here?

This question is available on Nuxt.js community (#c33)
@Atinux

This comment has been minimized.

Copy link
Member

commented Jan 16, 2018

Could you start again please? I made a fresh install and it work perfectly now.

@Atinux Atinux closed this Jan 16, 2018

@simonl65

This comment has been minimized.

Copy link

commented Feb 9, 2018

I get the same issue - completely new install: I did the following:

npm i -g create-nuxt-app
npx create-nuxt-app nuxt002
npm run dev

Result:

 ERROR  Failed to compile with 1 errors                                                                                                                                                                                              12:44:22

This dependency was not found:

* E:\simonl\Documents\_dev\!learning\nuxt002\.nuxt\client.js in multi webpack-hot-middleware/client?name=client&reload=true&timeout=30000&path=/__webpack_hmr ./.nuxt/client.js

To install it, you can run: npm install --save E:\simonl\Documents\_dev\!learning\nuxt002\.nuxt\client.js

 OPEN  http://localhost:3000

I tried: npm install --save E:\simonl\Documents\_dev\!learning\nuxt002\.nuxt\client.js but got:

npm ERR! code ENOLOCAL
npm ERR! Could not install from "..\simonlDocuments_dev!learningnuxt002.nuxtclient.js" 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\simonl\AppData\Roaming\npm-cache\_logs\2018-02-09T12_50_16_608Z-debug.log

Not sure if this is a nuxt, create-nuxt-app or webpack issue. Any ideas?

@simonl65

This comment has been minimized.

Copy link

commented Feb 9, 2018

Also, I just tried:

vue init nuxt-community/starter-template nuxt003
cd nuxt003
npm i
npm run dev

I got the same error.

@simonl65

This comment has been minimized.

Copy link

commented Feb 9, 2018

Ouch! NUXT is very broken - I've now followed the Starting from Scratch instructions and still get the error! What have I missed here?

@dotnetCarpenter

This comment has been minimized.

Copy link

commented Mar 22, 2018

@simonl65 Perhaps you're missin eslint-loader - try to do npm i -D eslint-loader.

If it works then I'll add a PR adding it to nuxt package.json.

@simonl65

This comment has been minimized.

Copy link

commented Mar 22, 2018

@dotnetCarpenter Thanks for your response. I actually discovered it was due to an exclamation mark in my folder path (which I think webpack doesn't like) so I'm using underscores instead! I'll try-out your suggestion though and let you know.

@simonl65

This comment has been minimized.

Copy link

commented Mar 22, 2018

No change :-( Here's my console log:

$ npm i -D eslint-loader
npm WARN eslint-loader@2.0.0 requires a peer of eslint@>=1.6.0 <5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ eslint-loader@2.0.0
added 7 packages in 11.026s

simonl@HAPPY MINGW64 ~/Documents/_dev/!learning/my-first-nuxt-app (section_2)
$ npm run dev

> my-first-nuxt-app@1.0.0 dev C:\Users\simonl\Documents\_dev\!learning\my-first-nuxt-app
> nuxt

  nuxt:build App root: C:\Users\simonl\Documents\_dev\!learning\my-first-nuxt-app +0ms
  nuxt:build Generating C:\Users\simonl\Documents\_dev\!learning\my-first-nuxt-app\.nuxt files... +2ms
  nuxt:build Generating files... +13ms
  nuxt:build Generating routes... +8ms
  nuxt:build Building files... +35ms
  nuxt:build Adding webpack middleware... +1s
  ████████████████████ 100%

Build completed in 0.959s



 ERROR  Failed to compile with 1 errors                                                                                     22:51:45
This dependency was not found:

* C:\Users\simonl\Documents\_dev\!learning\my-first-nuxt-app\.nuxt\client.js in multi webpack-hot-middleware/client?name=client&reload=true&timeout=30000&path=/__webpack_hmr ./.nuxt/client.js

To install it, you can run: npm install --save C:\Users\simonl\Documents\_dev\!learning\my-first-nuxt-app\.nuxt\client.js

 OPEN  http://localhost:3000
@simonl65

This comment has been minimized.

Copy link

commented Mar 22, 2018

Same again after doing npm i -D eslint.

@dotnetCarpenter

This comment has been minimized.

Copy link

commented Mar 23, 2018

@gomezmark

This comment has been minimized.

Copy link

commented May 31, 2018

Anyone solved this issue?

@simonl65

This comment has been minimized.

Copy link

commented May 31, 2018

I've not looked at it since my last comment. I got around it by ensuring I had file paths that webpack is hapy with.

What error message are you seeing?

@gomezmark

This comment has been minimized.

Copy link

commented May 31, 2018

Hi Sir @simonl65

Currently, im using starter-template for nuxt.
Then, eventually I added Vuetify.
I've noticed that v-select is rendered differently from the sample on the official website.

image
This is the structure of the component for v-select

@simonl65

This comment has been minimized.

Copy link

commented May 31, 2018

Sorry - I can't help you. I think you'll need to post a new issue for that - I don't think that's got anything to do with this issue.

@LeCoupa

This comment has been minimized.

Copy link

commented Jun 4, 2018

Got the same issue after updating all packages to their latest version. One of them was probably messing around with the project. I solved this problem by going back to the previous ones.

@fredDesign

This comment has been minimized.

Copy link

commented Jun 4, 2018

same issue :(

@leo91000

This comment has been minimized.

Copy link

commented Jun 13, 2018

same issue here. I got it after cloning a project and then npm i -> npm run dev

@Atinux

This comment has been minimized.

Copy link
Member

commented Jun 13, 2018

To be sure, this is on Windows right?

@Atinux Atinux reopened this Jun 13, 2018

@madebysoren

This comment has been minimized.

Copy link

commented Jun 15, 2018

I had the same problem, fixed when I ran this and re-created project from scratch:

npm install -g @vue/cli @vue/cli-init

@leo91000

This comment has been minimized.

Copy link

commented Jun 15, 2018

Yes windows, to be clear on what I did : create-nuxt-app -> no custom server option -> vuetify ui -> update dependency -> pushing my changes on github. Then I go on another computer, I clone the project , I run npm i and npm run dev and it gave me the error.

@u007

This comment has been minimized.

Copy link

commented Aug 14, 2018

in my case, devDependencies was missing: eslint-loader

hope this works for you:

npm i --save-dev eslint-loader

@Atinux Atinux closed this Aug 15, 2018

@jeliasson

This comment has been minimized.

Copy link

commented Oct 4, 2018

Anyone else still experiencing this?

ERROR in multi webpack-hot-middleware/client?name=client&reload=true&timeout=30000&path=/__webpack_hmr ./.nuxt/client.js
Module not found: Error: Can't resolve 'eslint-loader' in 'C:\...'
  "dependencies": {
    "cross-env": "^5.2.0",
    "nuxt": "^2.0.0",
    "express": "^4.16.3",
    "element-ui": "^2.4.6",
    "@nuxtjs/axios": "^5.0.0"
  },
  "devDependencies": {
    "nodemon": "^1.11.0",
    "babel-eslint": "^8.2.1",
    "eslint": "^5.0.1",
    "eslint-loader": "^2.0.0",
    "eslint-plugin-vue": "^4.0.0"
  }
@denlly

This comment has been minimized.

Copy link

commented Oct 20, 2018

I got the same issue, but I solved.
You can see file nuxt.config.js.

build:{
extend(config, ctx) {
// Run ESLint on save
if (ctx.isDev && ctx.isClient) {
config.module.rules.push({
enforce: 'pre',
test: /.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
})
}
},
}

remove node extend.

@tetreault

This comment has been minimized.

Copy link

commented Nov 19, 2018

I'm facing this now. I never used to have these issues with the prior version of nuxt. Newer version of Nuxt seems to have a lot of issues.

For example I was working on a project all day saturday w/o any issue. I return to it today and do npm run dev and suddenly i cant load it on localhost and it complains about eslint-loader and eslint when I was having no problem for 8 hours on saturday while working on it.

@tetreault

This comment has been minimized.

Copy link

commented Nov 19, 2018

uninstalled eslint and eslint-loader, and commented out the build section mentioned by @denlly and finally got the project to run on npm run dev. pretty concerning though since, as I mentioned, I was working on this for hours without an issue only to have this issue pop up when returning days later. never experienced that with nuxt before.

@alexschomb

This comment has been minimized.

Copy link

commented Jan 9, 2019

Unfortunately I just updated nuxt as well on my project and now I receive loads of dependency errors for files in .nuxt. Interestingly they are gone if I remove all eslint packages leaving only that one dependency error concerning .nuxt/client.js, but if I comment out the build section mentioned above the original errors for many files in the .nuxt folder.

How can we fix this? I'm running on MacOS and not Windows without any special characters in the path.

@Atinux are you willing to reopen the issue?

@tetreault

This comment has been minimized.

Copy link

commented Jan 9, 2019

I can follow up on this since I've not been having the same terrible issues. For me, getting the eslint errors is fine but prettier was actually a big problem and it wasn't jiving with my VSCode and wasnt autoformatting things for me. Not sure why, but it was a few months ago and I can live without prettier.

If you select eslint as a linter when using create-nuxt-app then be sure to add options: { fix: true } to your extend block in nuxt.config.js. Here's mine:

extend(config, ctx) {
      // Run ESLint on save
      if (ctx.isDev && ctx.isClient) {
        config.module.rules.push({
          enforce: "pre",
          test: /\.(js|vue)$/,
          loader: "eslint-loader",
          exclude: /(node_modules)/,
          options: {
            fix: true
          }
        });
      }
    }

Now I dont have the same problems i did back in november. Hope this helps!

@alexschomb

This comment has been minimized.

Copy link

commented Jan 11, 2019

Thanks for your hint. Unfortunately neither adding the fix: true option nor removing prettier fixes the problem for me. 😒

These relative modules were not found:                                                                                                                                           
* ../node_modules/@fortawesome/fontawesome-svg-core/styles.css in ./.nuxt/App.js
* ../assets/main.css in ./.nuxt/App.js
* ../node_modules/bootstrap/dist/css/bootstrap.css in ./.nuxt/App.js
* ./alert.css in ./node_modules/bootstrap-vue/es/components/alert/alert.js
* ./table.css in ./node_modules/bootstrap-vue/es/components/table/table.js
* ./form-input.css in ./node_modules/bootstrap-vue/es/components/form-input/form-input.js
* ./dropdown.css in ./node_modules/bootstrap-vue/es/components/dropdown/dropdown.js
* ../layouts/error.vue in ./.nuxt/index.js
* ../../layouts/error.vue in ./.nuxt/components/nuxt.js
* ./components/nuxt-loading.vue in ./.nuxt/App.js
* ../layouts/default.vue in ./.nuxt/App.js
* ../pages/index.vue in ./.nuxt/router.js

(obviously those files do exist!)

@alexschomb

This comment has been minimized.

Copy link

commented Jan 21, 2019

After some more package updates the errors are gone. This was probably a temporary issue with some eslint package.

@tetreault

This comment has been minimized.

Copy link

commented Jan 29, 2019

This is easy to recreate if you skip using eslint. I love Nuxt, but I'd also love not having the starter package break when doing npm run dev if you didn't select eslint. Is there a proposed fix for this edge case if a user makes a new project and doesn't select eslint in the terminal? I forgot about this issue but accidentally ran into it again today because i didnt select eslint when creating a new project with create-nuxt-app.

Can this be re-opened? Also I've not contributed to Nuxt before, but if there's some guidance on how I could help with a PR for this please feel free to let me know.

@ruzpuz

This comment has been minimized.

Copy link

commented Jan 29, 2019

I am having the same issue, should be reopened.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.