Closed mrtijn closed 6 years ago
Could you start again please? I made a fresh install and it work perfectly now.
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?
Also, I just tried:
vue init nuxt-community/starter-template nuxt003
cd nuxt003
npm i
npm run dev
I got the same error.
Ouch! NUXT is very broken - I've now followed the Starting from Scratch instructions and still get the error! What have I missed here?
@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
.
@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.
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
Same again after doing npm i -D eslint
.
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 .
Anyone solved this issue?
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?
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.
This is the structure of the component for v-select
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.
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.
same issue :(
same issue here. I got it after cloning a project and then npm i -> npm run dev
To be sure, this is on Windows right?
I had the same problem, fixed when I ran this and re-created project from scratch:
npm install -g @vue/cli @vue/cli-init
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.
in my case, devDependencies was missing: eslint-loader
hope this works for you:
npm i --save-dev eslint-loader
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"
}
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.
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.
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.
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?
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!
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!)
After some more package updates the errors are gone. This was probably a temporary issue with some eslint package.
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.
I am having the same issue, should be reopened.
Hi,
I'm getting the following error after updating to nuxt 1.0.0
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:
Any idea what could be the issue here?