using raphael.js in a spine.js application - module raphael not found - spine.js

Hoping someone can help here...
I'm trying to use raphaeljs in a spine app but I can't seem to get it to load the module.
Ive done the following:
installed node and npm
created an app using spine.app
added raphael to package.json and slug.json
added Raphael = require('raphael') to my controller
run npm install .
I can see npm has installed the raphael node module under 'node_modules', but when I load the app, I'm getting 'uncaught exception: module raphael not found'
Hopefully I'm just missing something stupid - can anyone point me in the right direction?
Thanks,
Pete

Related

Cannot find module './src/data' with vue-cli

I created a project with vue-cli 4.1.1, and after running yarn serve, i got the following error
Error: [BABEL] C:\dev\vuestudy\src\main.js: Cannot find module './src/data' (While processing: "C:\\dev\\vuestudy\\node_modules\\#vue\\cli-plugin-babel\\preset.js")
Any tips on this?
Thanks in advance.
UPDATE:
Kousha and Dave are right,after waiting for the core-js package update, I created a new project, and now it's working.
It looks like there's been a bad build of npm package core-js-compat. This is a deep-down dependency of Babel. Lots of things will be affected, things that use Babel.
You will experience this problem if you have core-js-compat v.3.4.6. You can check this by doing npm list core-js-compat. The problem is apparently fixed by v.3.4.7, which was pushed out pretty quickly, about half-an-hour later, but unfortunately it takes a while to spread out through the repositories. You can either wait until an npm update gets you v.3.4.7 or you can go manually download v.3.4.7 if you want to get going right away.
This is a bug with core-js-compat v3.4.6, but already the fix has gone with v3.4.7. See https://github.com/zloirock/core-js/issues/712 for more detail.
You may be able to force install the not-broken version with
npm i core-js-compat#3.4.7 --save
It worked on my machine™
With Vue / Nuxt, you can delete package-lock.json and node_modules and do an npm install to fix this issue.

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

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

Using vue.js with Phoenix failed so far

I follow this tutorial to learn to use vue.js in a Phoenix web app.
So far I made until I should get the word Vuechat in browser, but I didn't. Instead I got error message in iex console like below:
05 May 13:19:52 - info: compiling
05 May 13:19:54 - error: Resolving deps of web\static\js\app.js failed. Could not load module 'my-app.vue' from 'c:\Users\sadmin\Documents\Elixir\vuechat\web\static\js'. Possible solution: add 'my-app.vue' to package.json and `npm install`.
I thought I did everything according to that tutorial, but still not getting it works. I don't know much about using brunch or npm too, so please help
Location of my-app.vue is shows in below image
P.S. I'm working under Windows 10 os and using Visual Studio Code
Thanks.