dependency issue

mrtijn
0
mrtijn
commented a year ago

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:
extend(config, { isDev, isClient }) { 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?

0
Atinux
23.8k
Atinux
commented a year ago

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

0
simonl65
0
simonl65
commented a year ago

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?

0
simonl65
0
simonl65
commented a year ago

Also, I just tried:

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

I got the same error.

0
simonl65
0
simonl65
commented a year ago

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

0
dotnetCarpenter
85
dotnetCarpenter
commented a year ago

@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.

0
simonl65
0
simonl65
commented a year ago

@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.

0
simonl65
0
simonl65
commented a year ago

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

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

+ eslint-[email protected]2.0.0
added 7 packages in 11.026s

[email protected]HAPPY MINGW64 ~/Documents/_dev/!learning/my-first-nuxt-app (section_2)
$ npm run dev

> my-first-nuxt-[email protected]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
0
simonl65
0
simonl65
commented a year ago

Same again after doing npm i -D eslint.

0
dotnetCarpenter
85
dotnetCarpenter
commented a year ago

Is the error message at least about another loader than eslint?

On Thu, Mar 22, 2018, 23:55 simonl65 notifications@github.com wrote:

Same again after doing npm i -D eslint.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nuxt-community/starter-template/issues/48#issuecomment-375483980,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACq81s8MdU9yuem_0BrlmyuanLSwiAXks5thCvjgaJpZM4RZAWA
.

0
gomezmark
0
gomezmark
commented a year ago

Anyone solved this issue?

0
simonl65
0
simonl65
commented a year ago

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?

0
gomezmark
0
gomezmark
commented a year ago

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

0
simonl65
0
simonl65
commented a year ago

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.

0
LeCoupa
5
LeCoupa
commented a year ago

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.

0
fredDesign
0
fredDesign
commented a year ago

same issue :(

0
leo91000
0
leo91000
commented a year ago

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

0
Atinux
23.8k
Atinux
commented a year ago

To be sure, this is on Windows right?

0
jamie-jenks
0
jamie-jenks
commented a year ago

I'm getting the same issue on Mac,

/xxx/xxx/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 /xxx/xxx/app/.nuxt/client.js

Started from scratch using:

vue init nuxt-community/starter-template app
cd app
npm install
npm run dev

0
madebysoren
0
madebysoren
commented a year ago

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

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

0
leo91000
0
leo91000
commented a year ago

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.

0
u007
0
u007
commented 9 months ago

in my case, devDependencies was missing: eslint-loader

hope this works for you:

npm i --save-dev eslint-loader
0
jeliasson
0
jeliasson
commented 8 months ago

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"
  }
0
denlly
0
denlly
commented 7 months ago

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.

0
tetreault
5
tetreault
commented 6 months ago

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.

0
tetreault
5
tetreault
commented 6 months ago

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.

0
alexschomb
0
alexschomb
commented 5 months ago

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?

0
tetreault
5
tetreault
commented 5 months ago

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!

0
alexschomb
0
alexschomb
commented 4 months ago

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!)

0
alexschomb
0
alexschomb
commented 4 months ago

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

0
tetreault
5
tetreault
commented 4 months ago

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.

0
ruzpuz
0
ruzpuz
commented 4 months ago

I am having the same issue, should be reopened.

0
Informations
QuestionUnresolved
#c33 - Created a year ago