Autoprefixer error in sublime 4, mapping and package.json - mapping

hi i installed autoprefixer css via package install . node.js is installed and i think i did everything right but when i try running it this error is showing up:
Autoprefixer
Error: (node:20773) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /Users/"myusername"/Library/Application Support/Sublime Text/Packages/Autoprefixer/node_modules/postcss/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use node --trace-deprecation ... to show where the warning was created)
can someone help me with it ?
thx

This is an issue with one of Autoprefixer's JavaScript dependencies, named postcss. The Autoprefixer plugin hasn't been updated in over a year, so some of its dependencies have grown a little stale. However, as detailed here, the fix is pretty straightforward.
Open the Terminal app, and type in
cd "~/Library/Application Support/Sublime Text/Packages/Autoprefixer"
(don't forget the quotes around the path, as it contains spaces)
Once in that directory, just run
npm update
and the JS deps should be updated. Restart Sublime, and you should be all set.

I found the same error:
[DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in
the "exports" field module resolution of the package at
.../node_modules/tslib/package.json.
Then I solved it by exploring in the file /node_modules/tslib/package.json and update the package.json file with the following.
"exports": {
...,
"./": "./*"
}

Related

. Why I am getting an error message? Building a React App

I wanted to start practicing with React to make a simple app. Went ahead and downloaded homebrew and node onto my computer. As I build my app with yarn install I get to the end where it tells you happy hacking. But when I run yarn start it gives me an error message.
-There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.
The react-scripts package provided by Create React App requires a dependency:
"eslint": "^6.6.0"
Don't try to install it manually: your package manager does it automatically.
However, a different version of eslint was detected higher up in the tree:
/Users/zacharyschneider/node_modules/eslint (version: 5.16.0)
Manually installing incompatible versions is known to cause hard-to-debug issues.
If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That will permanently disable this message but you might encounter other issues.
To fix the dependency tree, try following the steps below in the exact order:
1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
2. Delete node_modules in your project folder.
3. Remove "eslint" from dependencies and/or devDependencies in the package.json file in your project folder.
4. Run npm install or yarn, depending on the package manager you use.
In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:
5. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
This may help because npm has known issues with package hoisting which may get resolved in future versions.
6. Check if /Users/zacharyschneider/node_modules/eslint is outside your project directory.
For example, you might have accidentally installed something in your home folder.
7. Try running npm ls eslint in your project folder.
This will tell you which other package (apart from the expected react-scripts) installed eslint.
If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That would permanently disable this preflight check in case you want to proceed anyway.
P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
zacharyschneider#Zacharys-MBP %
A way to solve this issue or help me understand what is going on that would be great or point me in the right direction to find resources.
Thanks for your Help
It seems like you have installed es-lint 5.16.0 manually, and it conflicts with the needed version (6.6.0).
Have you tried the steps suggested in the error message?
Do you explicitly tell the es-lint version in your package.json? Could you share your package.json if you continue to experience the issue?

Ejabberd can't find include lib "p1_xml/include/

I have follow https://www.process-one.net/en/wiki/ejabberd_HTTP_request_handlers/ to create example, I have installed Ejabberd 14.07 on mac os. I have compile this program by using
erlc -I /Applications/ejabberd-14.07/lib/ejabberd-14.07/include -pz /Applications/ejabberd-14.07/lib/ejabberd-14.07/ebin mod_http_hello.erl
But when I compile I have found below Error Message.
/Applications/ejabberd-14.07/lib/ejabberd-14.07/include/jlib.hrl:22: can't find include lib "p1_xml/include/xml.hrl"
/Applications/ejabberd-14.07/lib/ejabberd-14.07/include/jlib.hrl:426: record xmlel undefined
/Applications/ejabberd-14.07/lib/ejabberd-14.07/include/jlib.hrl:466: type xmlel() undefined
I have Searched but didn't find any solution, If you any idea how to solve this error then guide me.
i did the following to get it solved, at the source i ran ./rebar get-deps and ./rebar compile and then i copied the deps to the include folder
cp -R deps/* /lib/ejabberd/include/
after that i was able to compile my module just fine
From 15.03, in order to fix this you must add an argument to erlc: -DNO_EXT_LIB
You missing some dependencies. Run ./rebar get-deps in the root of the ejaberd source directory and look in the ./deps directory.
I have Solved this issue, this is not the proper solution for this error, but I have spent 2 days to solve this so to work ahead I have used this solution.
You can see that xml.hrl file is not found, so I have copied file content to jlib.hrl file, where it is included and it shows no error.
If you are confused about that xml.hrl file is not available so How can the content be copied then for that you have to follow steps to install ejabberd using command line. When you run "make command" it will add all dependencies.
GO to deps -> p1_xml-> xml.hrl

Failed to load package in Dart

When I try to import a package with the syntax import 'package:markdown/markdown.dart';, I get no error in Dart Editor but when I run the dart application, the debugger shows me the message:
An error occurred loading file: package:markdown/markdown.dart
Failed to load resource
chrome-extension://gfjabgeipkcfopofkhjimepepnomcidk/dart/packages/markdown/markdown.dart
But when I write the whole path (import "../../packages/markdown/markdown.dart";) everything works fine. I cannot understand why the syntax package: doesn't work in my code though it works in Dart Editor's own examples.
You can see the Chrome app architecture below (I'm loading a package from translator.dart):
You should have the package added as a dependency in pubspec.yaml (which I assume you do).
Also try running following:
delete packages folder
delete pubspec.lock
run pub get to fetch the
dependencies again.
I think in your md_to_html folder you need a link to the 'packages' directory for the shortform to work. I seem to remember this happening when the workspace is built but I'm not sure now which command triggers it, have a look at the current pub docs.

Pub does not download dependencies on Windows 7 after the update to lib v2 (SDK 0.3.1_r17328)

After the update to the version 0.3.1_r17328 of Dart SDK and Dart Editor I have some trouble to import some library particulary Args library. I have the same problem both directly importing Args or importing Web_ui where Args is one of the dependencies.
Here is my pubspec.yaml:
name: notes
description: A sample application
dependencies:
web_ui: 0.3.0+1
or:
name: notes
description: A sample application
dependencies:
args: 0.3.1+1
Here is the error generate from build.dart
Unable to open file: C:/Users/Fabio/Dropbox/progetti/note/packages/args/args.dart'package:web_ui/component_build.dart': Error: line 25 pos 1: library handler failed
import 'package:args/args.dart';
'file:///C:/Users/Fabio/Dropbox/progetti/note/build.dart': Error: line 1 pos 1: library handler failed
import 'package:web_ui/component_build.dart';
I solved the problem. It seems that the Cache folder (Pub) has been corrupted.
I have deleted the folder Cache: C:\Users\<UserName>\AppData\Roaming\Pub
Then i run pub install from command line and it works.
Unfortunately, I was getting the same error with my windows XP machine.
In the end, I logged into my windows 7 machine and was able to
download the packages, zipped them up and pasted the libraries into my
windows XP dart editor. Success!
I had no reason to believe I had the exact proxy issue #shindokaku had as I am using my home computer.
I tried all the suggestions on deleting the .cache files, pub.lock files and the packages folder and retrying. I uninstalled dart editor and tried again. I also tried using the git resources to download web-ui and running commands through the command line to no avail
Including suggestions in this similar questions:
cannot-find-referenced-source-packages
is-there-a-workaround-for-pub-dependency-resolution-through-proxies
This problem has been haunting me over and over for a few weeks. I am not using Windows, so this answer is not intended to help the original poster who is using Windows 7.
If you are using Linux here are the steps I use to repair corrupted pub cache.
Go to the top level directory of your app. You should see at least pubspec.lock, pubspec.yaml, a folder named packages, and a folder named web.
Delete your pubspec.lock, and packages folder.
[Make sure you aren't storing your own libraries in the packages folder]
cd ~/dart/myApp/
rm -r packages
rm pubspec.lock
Now once you have removed these files:
pub cache repair
Note 1: if your dart-sdk is not in your systems $PATH, than you will want to use the absolute path to the sdk when using the above command. Comment if you need that explained.
Note 2: This is working solution with Dart 1.5.3. I have not tested this on earlier versions.
Try deleting your pubspec.lock file and packages directory in the root folder of the project. Then run pub install again, when things get wacky thats what I do.
You should try to run pub update. I have sometimes found that this doesn't work as expected from the editor, but generally works quite smoothly when called from the command line.

pub install does not work in Dart

I am trying to install glmatrix using pub install. My OS is Windows 7 and I have Git installed.
Here is my pubspec.yaml
name: WebGLTut1
description: A sample application
dependencies:
glmatrix:
git: git://github.com/pjako/glmatrix.dart.git
When I run pub install I get the following error:
Running pub install ... Pub install fail, FormatException: Could not
parse "git://github.com/pjako/glmatrix.dart.git".".
I googled a while to find a solution but couldn't. Please help.
UPDATE#1:
I found the problem. There has to be a TAB/Space when specifying git: url in pubsec.yaml as follows.
glmatrix:
git: git://github.com/pjako/glmatrix.dart.git
This solved the previouse problem of FormatException. But now when I run pub install again it throws theis error.
Running pub install ... Pub install fail, Git failed.
As you identified you update, yaml files are whitespace sensitive; that's why you don't have to use lots of curly braces like json. :)
I see a few of possible problems here:
First
Glmatrix doesn't appear to have its own pubspec defined. Libraries participating in the package system much declare a pubspec file with the name property defined. The name is important because pub uses it when you declare your dependencies. Let's say you had a project called toast with the following simple pubspec:
name: butter
version: 0.0.0
Then you would need to declare your dependency to that project like so:
dependencies:
butter:
git: git://github.com/foo/toast.git
Have the project owner make the changes or fork it yourself, add the pubspec, and then reference your fork in your pubspec.
Second
Glmatrix is does not conform to the pubspec package layout conventions (your own projects should also conform to this). Although I believe that pub may handle non-conforming layouts currently, it may not in the future. So again, you can either ask the project owner to fix, or fork and fix it yourself.
Third
Since you are on windows, make sure git is in your system PATH variable. If you are using the bash shell, git will work, but it's not going to work outside of bash (like from Dart editor) until you add it to your PATH.

Resources