After SvelteKit Migration Server Index.js not found - migration

So I am trying to migrate my SvelteKit project with this migration guide:
https://github.com/sveltejs/kit/discussions/5774
I updated to sveltekit version 1.0.0-next.405 and my app works fine.
I then execute `
npx svelte-migrate routes
and it executes fine. I have the new folder structure in my project.
I searched the codebase for #migration and "migration" but found no other files with to-dos.
So I am trying a npm install && npm run dev and get the following error
404
Not found: /
Error: Not found: /
at resolve (file:///home/yannick/Downloads/test%20migration/.svelte-kit/runtime/server/index.js:3523:14)
at async Object.handle (//home/yannick/Downloads/test migration/src/hooks:8:19)
at async respond (file:///home/yannick/Downloads/test%20migration/.svelte-kit/runtime/server/index.js:3402:20)
at async file:///home/yannick/Downloads/test%20migration/node_modules/#sveltejs/kit/dist/vite.js:1539:22
did I miss a step during migration?
Went to all the folders described in the error and could not find any more hints.

I think it was just because I did not update to .406 after migration
Comment here describes how it is done
https://stackoverflow.com/a/73578603/12505487

Related

Opening Cypress gives an error in not finding resource.pak

I'm trying to add End to End testing to my application through Cypress, however I've run into the issue that, after installing cypress through "npm install cypress" the command listed in their documentation "npx cypress open" will not work. It gives the following error.
`[35608:0112/105037.652:ERROR:resource_bundle.cc(991)] Failed to load C:\Users\User\AppData\Local\Cypress\Cache\12.3.0\Cypress\resources.pak
Some features may not be available.
Error: Cannot find module 'socket.io-client/dist/socket.io.js'
Require stack:
C:\Users\User\AppData\Local\Cypress\Cache\12.3.0\Cypress\resources\app\packages\socket\index.js`
What I've tried is a fresh reinstall of cypress, specifically adding socket.io and socket.io-client globally. I've also looked into the file path of resource.pak and have confirmed the folder is there.
Same issue here. Downgraded to 12.1.x to make it work again.

How to fix relative module error for a newly created nuxt.js app with starter template?

I tried to create a nuxt app with the guide from the official website, chose default options because I wanted the starter template but on running npm run dev, I keep encountering the error:
This relative module was not found:
* ./components/nuxt-error.vue in ./.nuxt/index.js
I've tried searching about it but I couldn't find any useful resource/fix. I've also tried vue init nuxt-community/starter-template for the installation but I still get the same error.
Any fixes?
So I found a solution. I couldn’t figure out the error because the nuxt-error.vue file was actually imported correctly. Turns out “npm” installations have been giving me issues (had issues with TailwindCSS too).
So if you ever encounter this error on loading the base nuxt app, recreate the project using “yarn” instead. Works like magic!
This Error basically means, that in one of your files you are trying to import another file with the relative path of ./components/nuxt-error.vue but no file with this path exists.
However
I just read that vue init nuxt-community/starter-template is deprecated and no longer maintained. Instead of fixing this Error you should restart your project with npx create-nuxt-app <yourAppName>. https://github.com/nuxt-community/starter-template

“Page Not Found” when navigating to site created with Gridsome & deployed on Netlify

I've created a new site using Gridsome deployed with Netlify, but I can't get the site to appear when accessed. Instead, Netlify says:
Page Not Found
Looks like you've followed a broken link or entered a URL that doesn't exist on this site.
< Back to our site
I tried updating my build settings based on the instructions of the creator of the Gridsome starter template I'm using, but the site still doesn't display. I've also updated the js-yaml version.
I've gone through the questions/answers for similar questions on here, but I haven't been able to figure this out. I'm new to web development, and I'm sure I'm missing one or more things contributing to the issue.
My GitHub repo for this site.
The site.
I have the build log from Netlify. There are some errors in it. I don't want to put too much here, so here's a part from the end of the log.
12:18:36 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
12:18:36 PM: Error running command: Build script returned non-zero exit code: 1
12:18:36 PM: Failing build: Failed to build site
12:18:36 PM: Finished processing build request in 55.729813394s
A Gist for the whole build log.
Thanks so much for your help, #talves!
I was having trouble using the build commands because of being new to cli stuff and a permissions issue. I asked a friend about the build errors I was getting from Netlify, and he recommended I try removing and re-installing my node modules. Did that, still didn't work. I tried removing anything in the repo having to do with "journal" since Failed to render /journal kept appearing in the build log, but that didn't work either.
I googled ReferenceError: _objectSpread is not defined after update since that was in the build log after the journal error. I found a comment on an issue noting the same error message in the main Babel GitHub repo that suggested adding the following to the package.json file:
"resolutions": {
"#babel/core": "^7.5.4"
}
I added it, tried to build again, and it still failed but only gave me one error message it didn't show before—Error: SyntaxError: Unexpected string in JSON at position. I googled that message and got another issue on GitHub. A comment on the issue noted a missing comma.
I went back to my package.json file and found that I didn't add a comma to the bracket above the new "resolutions" snippet. I added the comma, tried to build again, and it worked 🤜💥✨ !
Sorry if this is long-winded! I thought it might be good to include my process on figuring this out in case others run into the same issues.

Nuxt generate show error: Cannot read property 'normalModuleFactory' of undefined

Recently I upgrade Nuxt from 1.4.0 to 1.2.x and Vuetify from 1.0.9 to 1.2.x. After that npm run dev works fine. but when I run Nuxt generate I get below error. I am stuck on this error since last night and can't find any idea why it's occurring. Any guidance will be helpful. Thank in advance.
nuxt:build Generating files... +138ms
nuxt:build Generating routes... +13ms
nuxt:build Building files... +314ms
ERROR
TypeError: Cannot read property 'normalModuleFactory' of undefined
- IgnorePlugin.js:96 IgnorePlugin.apply
[vue]/[webpack]/lib/IgnorePlugin.js:96:18
- Tapable.js:375 Compiler.apply
[npm]/[nuxt]/[tapable]/lib/Tapable.js:375:16
- webpack.js:33 webpack
[npm]/[nuxt]/[webpack]/lib/webpack.js:33:19
- builder.js:524 compilers.compilersOptions.map.compilersOption
[npm]/[nuxt]/lib/builder/builder.js:524:24
- Array.map
- builder.js:523 Builder.webpackBuild
[npm]/[nuxt]/lib/builder/builder.js:523:39
- builder.js:168 Builder.build
[npm]/[nuxt]/lib/builder/builder.js:168:16
package.json can be find here.
nuxt.config.js can be found here.
I tried to dig about it, but it seems to be generated through webpack. So I updated to webpack 4 too. But still it's throwing this error.
If you need any more details, I would be happy to provide.
After a long talk with developer community of nuxtjs. Here is solution.
This problem occur when we try to run nuxt generate but our local nuxt version !== global nuxt version.
So solution is either update global nuxt version by npm i -g nuxt or run project from local nuxt version node_modules/.bin/nuxt generate

Zyre.js in react-native

I am currently trying to work with zyre.js in my project. I tried to npm install zyre.js and it added itself to the node_modules folder in my project. When I tried to run my application after installing this, I got no error. After adding the line const Zyre = require('zyre.js'); I get the following: The development server returned response error code:500 unable to resolve module 'events' from C:\Users\User\Desktop\GitHub...\node_modules\zyre.js\lib\zyre.js ...
I cannot seem to get this to work. Any help would be much appreciated