How can I display my index.html using parcel? - npm

I would like to display a project I am working on with parcel by typing parcel index.html
parcel charges then display this error message :
29 | "#parcel/transformer-sass": "^2.0.0-beta.2",
30 | "#parcel/transformer-vue": "^2.0.0-beta.2",
| ^^^^^^^^^^^^^^^^^^^^^^^^^ Found this conflicting local requirement.
31 | "#vue/component-compiler-utils": "^3.2.0",
32 | "sass": "^1.26.10",
Thanks for your help!

There are a variety of things that can cause this error, and it's impossible to say exactly what you need to do what without a more specific repro.
However, a little background information about where this error comes from could give you some pointers about where to look / what to try.
Parcel has a feature that will automatically install the dependencies that it needs using npm, yarn or pnpm. For example, suppose you add a .sass file to your project, but have not yet installed #parcel/transformer-sass - parcel tries to detect this and install it automatically. When it works, it's pretty magical, but when it goes wrong, you'll see errors like this.
Two things you can do to possibly fix or work around this error:
Make sure the versions of all parcel-related packages you have installed are aligned. (I see, for example, that you have lots of 2.0.0-beta.2 packages - now that 2.0.0 is released, upgrade to that (or whatever the current version of parcel is in the future).
As a last resort, try disabling auto-install by setting --no-autoinstall cli flag (see docs). You might still get other errors if there are plugins that are required that are not yet installed, but they might be more specific.

Related

What means this Vue devtools version hint?

My Vue devtools show this version hint:
I don't understand from where the version number 3.2.28 is coming though or to what exactly it refers to - my vue version is 3.2.25.
Can't see much more than what you provided in the image, but I think a reasonable guess is that you are using something like this:
"dependencies": {
"vue": "^3.2.25"
},
If that's the case, the install script will get the latest patch version, which would be 3.2.28 at the time of install, and 3.2.29 at the time of screenshot. This will also update the npm (or yarn) package which will make it re-install 3.2.28 even when 3.2.29
if you want to lock it, remove the ^ character, if you want to understand better why and how this is happening look into the Using semantic versioning to specify update types your package can accept documentation

react-native-router-flux undifine is not a function (evaluationg 'addListner')

I upgraded my router-flux version 0.27 to 0.30.
I am facing error of evaluating addListner I also submit it in the issue
4.0.0-beta.30 is broken as the last commit says
update dependencies, bump version - don't use, errors are possible!
4.0.0-beta.28 is broken too. Use 4.0.0-beta.27 instead.
In package.json, make sure you have exactly this:
"react-native-router-flux": "4.0.0-beta.27"
Don't include ^ otherwise your package manager will still install the .28 version (unless you have a yarn.lock at .27).

SystemJS can't load aurelia-event-aggregator even though Aurelia has already loaded it

I'm simply trying to import 'aurelia-event-aggregator' into a TypeScript class and I get this error in my console. Even though it says it's loaded and configured aurelia-event-aggregator on lines 5 & 6, it says SystemJS still can't find it. This is especially strange since I'm also (successfully) importing autoinject from 'aurelia-dependency-injection' and customElement from 'aurelia-framework' without a problem, and they seem to be configured/installed identically to the event aggregator on my system via jspm.
My config.js and package.json are here.
I haven't the slightest idea how to start troubleshooting this. Please let me know if there's any other information I can provide.
This is going to sound dumb, but you need to run jspm install aurelia-event-aggregator. I know it's already in your project, but jspm 0.16 doesn't support peer dependencies (at least that's what I remember), so you have to explicitly install it as a top level dep for your app and then it will start working.

flowtype errors in base AwesomeProject

I recently wanted to reset a react-native project to most recent version, and so I initialised the seed project - "AwesomeProject"... The problem is that it comes with 19 flowtype errors "out of the box"
node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationCardStackStyleInterpolator.js
lines:91,94,97,104,107,137,142,148
node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationHeaderStyleInterpolator.js
lines:57,68,74,87,94
node_modules/react-native/Libraries/Experimental/WindowedListView.js
lines:629, 629, 665,665
node_modules/react-native/Libraries/Image/Image.ios.js
line:272
I am reluctant to make changes to these files as it may create knock on effects. Does anyone have a work around?
In general, whenever you want flow to ignore a file, you can just specify that file under the [ignore] section of your .flowconfig.
That said, I just react-native init'd a project, using react-native-cli 1.0.0 and react-native 0.29.1, and ran a flow server on the root of my project, and didn't get any errors.

Dotless failing to compile ; in Bootstrap 3 less source

I use dotless 1.3.1.0 compiling less-files. This worked fine with bootstrap 2.x, but after switching to bootstrap 3.0.0 (downloaded the source from here: http://getbootstrap.com/getting-started/), I suddenly get this error:
Expected ')' but found ' ' on line 47 in file 'mixins.less': [46]: //
Sizing shortcuts [47]: .size(#width; #height) {
------------^ [48]: width: #width;
Seems that having a ; as seperator between parameters is not valid less. The original source in the mixins.less looks like this:
...
// Sizing shortcuts
.size(#width; #height) {
width: #width;
height: #height;
}
...
Do I have to use an updated less compiler? Or did bootstrap release buggy less source?
UPDATE 1: I can see, that a pull request for dotless exists, fixing the problem with ;
https://github.com/dotless/dotless/pulls
"Fixes for ; not supported in mixin parameter lists #319 #320"
I will go using the css files until this has been fixed in dotless.
If you check out bootstrap's getting started page, you'll find that they state:
LESS compilation
If you download the original files, you need to compile Bootstrap's
LESS files into usable CSS. To do that, Bootstrap only officially
supports Recess, Twitter's CSS hinter built on top of less.js.
Though not using dotless, I followed a similar path that you did using lessc, and then found that using recess resolved my issue. Perhaps using recess would be an option for you too?
As an example, I have a file called tmpfl.less with the following contents:
#import "mixins.less";
#import "variables.less";
.wrapper {
.make-row();
}
.content-main {
.make-lg-column(8);
}
.content-secondary {
.make-lg-column(3);
.make-lg-column-offset(1);
}
If I run lessc on it, I get the following result:
lessc tmpfl.less
NameError: .size is undefined in mixins.less:47:0
46 // Sizing shortcuts
47 .size(#width; #height) {
48 width: #width;
Now, I successfully use recess as follows:
recess --compile tmpfl.less > tmpfl.css
Update:
In order to utilize Recess in a .Net environment, specifically in Visual Studio, one can follow these instructions for details on installing. Those instructions provide an overview, but perhaps leave out some details on getting Node.js installed. Microsoft has some brief words about it and they link to a GitHub project which might be helpful depending on your version of Visual Studio.
If you don't go down the Node.js-in-Visual Studio route, then really the main goal is to have Node.js installed somewhere, and then ultimately npm, the package manager for Node.js so you can install Recess. That can be achieved on Windows by going to the Node.js download, and installing the Windows version. Installing npm is highlighted in this stackoverflow discussion. Once installed, you just need to run npm to install Recess as follows:
npm install recess -g
That is also discussed in the first link of this update.
One of my colleagues that uses dotless has had a few fixes for Bootstrap 3 issues merged. Apparently Bootstrap3 will now compile with the latest code :)
https://github.com/dotless/dotless/commits/master
I expect an updated NuGet package will be available soon (based on this tweet)
After spending hours on getting this to work myself i found that dotless is quite useless at this time.
but here is where you can impliment Less and Bootstrap 3 Less in your mvc ASP.Net Project
http://www.tomdupont.net/2013/10/bootstrap-3-less-bundling-and-aspnet-mvc.html?showComment=1386250367416#c1439130135847828203
This guy just won an internets in my book and if you can track down his stack exchange account for me let me know.
I have put together an httphandler which will compile less using lessjs.
It's more of a proof of concept than production quality code, however it may be useful for some people as a starting point.
You can find the source here:
https://bitbucket.org/martinbooth/clearscriptless
In case anyone is interested in trying to do this using jurassic, you can find my attempt here:
https://bitbucket.org/martinbooth/jurassicless
I don't recommend Jurassic for this because
it required a few bug fixes to the library which are not currently
integrated into the main project My changes are now in the master branch of Jurassic so this is no longer an issue (though the latest release does not currently include them)
it is very slow, hence the
reason I tried clearscript