How do you spin up a new spine app using the spine.app cli? - spine.js

I'm attempting to use the spine.app cli and I'm encountering a couple of errors and I'm uncertain what the root cause actually is.
The guide found at: http://spinejs.com/docs/started gives these steps
spine app my-app
cd my-app
npm install .
hem server
following these steps, initially yields this error on the terminal:
Cannot find module: es5-shimify. Have you run `npm install .` ?
Investigating, it seems es5-shimify has been deprecated in favor of es5-shim, so my initial inclination was to replace the dependency to es5-shim. So I updated setup.coffee to require('es5-shim'), and I updated the referenced slug.json module and restarted the server. This seems to get me a little further, but still produces an error ( though not in the terminal, instead in the chrome console )
Uncaught TypeError: Property 'jQuery' of object [object Object] is not a function
This appears to be occurring on line 8 of public/index.html. I did some debugging here and it appears that require('jqueryify') is returning undefined, and I'm not certain what the expected result is. Any guidance on the right way to approach this process or perhaps information on what the root issue might be would be greatly appreciated.

Use the latest version try again.
The package.json as following
{
"name": "app",
"version": "0.0.1",
"dependencies": {
"spine": "~1.3.0"
}
}
all others dependencies has been removed,and it works for me.

Related

found 1 high severity vulnerability (react-native-svg)

I'm trying to create a SVG component.
I have this problem after run command "npm i".
I think versions between packages aren't compatible.
How to fix this or create SVG component without react-native-svg package?
Thank a lot.enter image description here
Add the following to package.json:
{
// scripts, dependencies, etc.
"resolutions": {
"css-what": "5.0.1"
},
}
Remove lock file. Install the packages. Check if the app is still working. If works then keep the configuration (and ignore the warnings) else revert it.
Since you are using npm, you may wanna first refer this thread: npm equivalent of yarn resolutions?

npm run serve gets hang on 98% while building

I'm working on a project using vuetify. I was using "npm run serve" command to build and run a live server. it was working all good until all of sudden my project stopped building. every time i try running the command "npm run serve" it builds and hangs on 98% without throwing an error.
i tried npm install. npm build none of these fix the issue
in my terminal i run this command and the result is as follows:
npm run serve
rep-vuetify#0.1.0 serve /Users/Desktop/rg21-vuetify/rep-vuetify vue-cli-service serve
INFO Starting development server...
98% after emitting CopyPlugin
IT hangs on 98% and don't do anything after this, been stuck on this step for whole week if some one can help me.
I have same problem stuck in 98%.
98% after emitting CopyPlugin
In my case, I recheck again my code, and I found my import path is invalid, something like :
import { myComponent } from ''
After fix the code, It works again.
I my case the problem is a empty require
getBackground() {
return `url(${require("")})`;
},
In Vue, if you have multiple HTML elements of a component/view not contained within a single element (eg. this DIV) the building will froze/halt unexpectedly.
Get sure to have all items contained within a section, div, etc.
Probably, NPM has nothing to do with this particular problem.
<template>
<div class="contain-all-stuff">
<!-- Anything inside this one single DIV container -->
</div>
</template>
If you are installed ESLint.
Try to run "npm run lint" command before you run "npm run serve"
it worked for me.
Try to update you NPM to the latest version and run your CLI as admin if you are using windows I have faced the same problem before.
Which version of NPM you are using?
I was getting the same issue with node version 12.6.0.
After node version updated to the 12.9.1, the issue is resolved for me.
I got the same error message, but I resolved it.
In my case, I just change different branch. after that, I change back the original branch, then it doesn't work when I run "npm run serve".
The problem is all import paths are case sensitive!
So when I change to the old branch, it changes my directory name to uppercase letters( before I use uppercase directory name). But the latest branch I already changed to lowercase letters for directory name.
For example, if your import like below:
component: () => import('#/views/test/Test'),
then you should check the directory's name and file's name must be the same uppercase letters and lowercase letters.
For anyone still having this problem past 2020, check everything in your Vuex index.js page and ensure that all the paths to you modules are correct. One of mine was incorrect and it took me an hour to figure it out. It might not be empty, so a search like suggested above will not help you in this case.
I had the same issue.. but the % the build was freezing was variable.
For me it was one stupid > that was missing in a closing div-tag..
Just wondering why I did not get an error on that :s

Publishing #progress/kendo-ui to nexus 3..5.1 npm pkg repository

We've migrated from Nexus 3.01.01 to 3.5.1-02. In the process we had to migrate internally published npms. One of those is the kendo-ui (commercial one) from Telerik/Progress. We have downloaded the licensed copy from Telerik and publishing it to our local nexus for consumption by our developers.
However the publishing fails with an error during payload parsing. I can publish the same tar without an issue to the older (3.01.01) nexus, so the tar/payload it self is OK.
The error seem to be at the point of trying to parse the npm payload. I can also publish a demo/simple npm (both scoped and non-scoped) without an issue. Spend the whole day trying to figure this out with no luck - appreciate any pointers or advice.
2017-09-06 18:49:09,160+0800 WARN [qtp762281666-4116] MIDALLE
org.sonatype.nexus.repository.httpbridge.internal.ViewServlet -
Failure servicing: PUT /repository/npm-hosted/#progress%2fkendo-ui
java.lang.IllegalStateException: Unexpected token VALUE_NULL at
[Source: java.io.InputStreamReader#1ebad5c7; line: 1, column: 896] at
com.sonatype.nexus.repository.npm.internal.NpmPublishParser.parseValue(NpmPublishParser.java:150)
at
com.sonatype.nexus.repository.npm.internal.NpmPublishParser.parseObject(NpmPublishParser.java:174)
at
com.sonatype.nexus.repository.npm.internal.NpmPublishParser.parseValue(NpmPublishParser.java:136)
at
com.sonatype.nexus.repository.npm.internal.NpmPublishParser.parseObject(NpmPublishParser.java:174)
at
com.sonatype.nexus.repository.npm.internal.NpmPublishParser.parseValue(NpmPublishParser.java:136)
at
com.sonatype.nexus.repository.npm.internal.NpmPublishParser.parsePackageRoot(NpmPublishParser.java:123)
at
com.sonatype.nexus.repository.npm.internal.NpmPublishParser.parse(NpmPublishParser.java:98)
at
com.sonatype.nexus.repository.npm.internal.NpmRequestParser.parseNpmPublish(NpmRequestParser.java:81)
at
com.sonatype.nexus.repository.npm.internal.NpmRequestParser.parsePublish(NpmRequestParser.java:60)
at
com.sonatype.nexus.repository.npm.internal.NpmHostedFacetImpl.putPackage(NpmHostedFacetImpl.java:85)
at
com.sonatype.nexus.repository.npm.internal.NpmHandlers$3.handle(NpmHandlers.java:172)
at
org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
Here's the gist for the full error from the nexus log.
This issue was resolved in scope of https://issues.sonatype.org/browse/NEXUS-14385
Fix Version/s:
3.6.1
There was a problem with parsing null values in package.json
I got this to work however I'm still trying to figure out the impact of the change. Please be cautious if you apply the same 'hack' to get this to work. I had to do this, because there was several other project teams that was getting affected.
In a nutshell I had to strip out few keys from the package.json of the kendo-ui package. My analysis is that these settings makes npm issue a network call that fails in our constraint environment.
The package.json keys that I removed are as follows.
First section
"_resolved": "https://registry.npm.telerik.com/#progress%2fkendo-ui/-/kendo-ui-2017.2.621.tgz",
"_shasum": "09a652ead21700716dd5a50f9e86e9bffcea640e",
"_shrinkwrap": null,
Second section
"dist": {
"shasum": "09a652ead21700716dd5a50f9e86e9bffcea640e",
"tarball": "http://registry.npm.telerik.com/#progress%2fkendo-ui/-/kendo-ui-2017.2.621.tgz"
},
I'd really appreciate if someone who know more about npm and npm definitions can inform the purpose of these settings in the package.json and potential impacts of removing them.

react-native init hangs/stalls with no error

New to react, working through a udemy tutorial on a Mac. Installed node ok but when I go to start a project
react-native init projectname
terminal output:
This will walk you through creating a new React Native project in /Users/myuserid/projects/projectname
Installing react-native package from npm...
and it just "hangs" there... seemingly frozen or chugging along. When I check Monitor it looks like Terminal is using 0% CPU. There is no indication (backslash flipping or otherwise) that it is processing.
Inside the projectname directory is a "package.json" file and a "node_modules" file with a bunch of subfiles.
I saw this post with a similar problem (https://github.com/facebook/react-native/issues/2806), but doesn't look like there is a remedy. Is there any way to speed this up? How can I tell if it has stalled forever? Will this happen during every project init I do?
I'm not in China... I have fast internet... and I'm using NPM 3.3.12
Thank you!
I got the same issue , and i found the 1st comment on the question is useful .
Indeed , If no error, it means that it takes time to download dependencies.
You can track downloading by adding --verbose :
react-native init projectname --verbose
You will spend a long period to reach 50% of downloading.
Nevertheless, you might face the following error :
npm WARN react-native#0.34.0 requires a peer of react#~15.3.1 but none
was installed. npm verb exit [ 0, true ]
If so , check this thread .
I had the same problem while using an existing (empty) directory as App name
It worked as soon as I changed the App name to something new

Upgrade to react-native 0.16 error

I upgraded my app from react-native 0.15 to 0.16 but after that I'm getting an error and I don't know how to solve it.
TypeError:undefined is not an object (evaluating 'GLOBAL.Text={
get defaultProps(){
throw getInvalidGlobalUseError('Text')}}')
In Chrome Debugger:
Uncaught Error: Uncaught TypeError: Cannot set property 'Text' of undefined
Thanks
OBS: I'm running on Android.
I notice that changing app name solves the problem, I'm using Evently as app name today. I tried to recreate my virtual machine but didn't solve it.
In my case, I was able to narrow the cause down to one item in my .babelrc file:
{
"presets": ["es2015"]
}
As soon as I removed that and restarted the packager (making sure to also use the --reset-cache flag), I stopped getting the error.
Update 2:
It looks like React Native is making some changes to their .babelrc in version 0.20.0. So, if you are using that version or newer, you should follow the instructions at: https://github.com/facebook/react-native/tree/master/babel-preset in order to specify your .babelrc settings.
Update:
I've narrowed this down further to transform-es2015-modules-commonjs, which React-Native sets some options on, specifically {"strict": false, "allowTopLevelThis": true}. The es2015 preset does not set this option, and it seems that the React-Native .babelrc does not override it. If you want to use es6 modules and transform them to commonjs, you'll need to put the following in your .babelrc:
{
"plugins": [
["transform-es2015-modules-commonjs", {"strict": false, "allowTopLevelThis": true}]
]
}
Note, Babel 6, which I updated to along with react-native 0.16.0, no longer contains any transforms by default. What I didn't initially realize is that the React-Native packager provides most of the transforms you might ever need (listed in their docs at: https://facebook.github.io/react-native/docs/javascript-environment.html#javascript-syntax-transformers), and I'm thinking that the "es2015" plugin interferes with some of those transformers.
I also tried using "babel-preset-react" (http://babeljs.io/docs/plugins/preset-react/), and that plugin did not seem to cause any errors.
I solve the problem. I think it was because permissions in project folder. I ran chown in my folder to correct the permissions problems and now all are working.
Thanks
In my case the problem was a rogue .babelrc two folders up (my root code folder); I had initiated a yeoman generator to scaffold out a new project using babel-6...accidentally running yeoman from the root code folder. Apparently babel traversed upwards from my project folders until it hit this .babelrc which borked the react-native babel configs...
^ this was originally an edit to my initial answer, which was deleted WHILE I WAS UPDATING IT