Openlayer map not visible i have install npm sucessfully - openlayers-3

Uncaught SyntaxError: Private field '#map' must be declared in an enclosing class

Suspect that npm is broken for openlayers (or openlayers is broken for npm)... it worked this morning until I did an npm update and now its all broken and stupid...
I had upgraded to npm 7.19.1 which npm cheerfully chirped about - I downgraded back to the npm 6.14.13 that comes with FC33. I'm also still learning to avoid installing npm modules with "sudo"...
Upgrading to 7.x npm start/build demanded that be used - and once you use it the .css in the example index.html from openlayers examlpes gets broken right at "#map" or ".map"...

Related

vips/vips8 file not found #include <vips/vips8> in Ionic cordova in IOS

I found an error in sharp.
After that, I found a blog in which they ask to delete sharp from the node module and run sudo npm i.
I have gone through GitHub and write minipass - 2.7.0
After that, I got a new error in
vips/vips8 file not found #include <vips/vips8>
I'm using Ionic with Angular on Macbook
I use commands which is
1.sudo npm install
2.sudo npm i gulp-sass -ES --unsafe-perm=true
3.sudo ionic cordova platform add ios
I very recently ran into a similar issue after making some changes to a project's package.json on my Mac (not an Angular or Cordova project).
I came across this GitHub issue for the sharp package which mentioned you may need to update the globally-installed version of libvips: https://github.com/lovell/sharp/issues/1148
In my case, since I use Homebrew but had not directly installed this package previously, I was able to resolve by running brew install vips and then re-running npm install. Note that it has a lot of dependencies so installation may take some time.
Edit: if that doesn't work, you may need to try a fresh install by removing node_modules, then re-running npm i.
This might be not applicable to everyone, but remove package-lock.json and node_modules directory first and then try npm install again. (I also added the minipass in my package.json, by the way)
In my case, I had encountered the same error, but I could solve it by doing the above.

packages installed with Yarn start to give error like sweetalert2

I am working on rails 6.
couple of hours back I added sweetalert2 with yarn like
yarn add sweetalert2
and than imported it like
import Swal from 'sweetalert2'
it was working fine and than I switched github branch & when came back to original branch,
it started to give error like
Cannot find module 'sweetalert2'
not sure if missed something or what happened.
UPDATE
I did yarn install but it says already up to date & same issue still exist.
yarn install v1.21.1
warning ../package.json: No license field
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.76s.
For sure, when you switch the branch, you can retry with npm install and yarn command as the code base has been changed/switched.
Try running yarn and npm install again.

Cannot find module 'babel-eslint' (both standard and babel-eslint already installed locally)

What version of standard?
12.0.1
What operating system, Node.js, and npm version?
Windows 10,
Node v10.15.1,
NPM v.6.8.0
What did you expect to happen?
I install both standard and babel-eslint on devDependencies
(locally).
I run standard --parser babel-eslint
I get the standard use babel-eslint parser to recognize babel code style and not stating
it as style error
What actually happened?
I install both standard and babel-eslint on devDependencies (locally).
I run standard --parser babel-eslint
I get error: Cannot find module 'babel-eslint'
I read from previous issues 85 1167, it should be fixed when they are installed on the same level. But it does not happen on mine.
I have tried to put config below on package.json:
"standard": {
"parser": "babel-eslint"
}
But it does not resolve the issue.
Hi this is an old question but for who passes here in the future, those answers didn't work for me, but this one did:
npm install babel-eslint --save-dev
Try
$yarn add standard babel-eslint
I solved this by doing:
npm install -g babel-eslint

React-native#0.26.3 requires a peer of react#15.0.2 but none was installed

I am trying to set up for the react native. but whenever I update files it gives m error
enoent ENOENT: no such file or directory, open 'React Native/package.json'
npm WARN react-native#0.26.3 requires a peer of react#15.0.2 but none was installed.
npm WARN React Native No description
npm WARN React Native No repository field.
npm WARN React Native No README data
npm WARN React Native No license field.
MacBook-Pro:React Native$ npm info react dist-tags.latest
Please let me know how can I fix.
Installing react should fix the error
npm install react --save
Also, you may try upgrading your react-native install. react-native is as v0.30.0 now
npm update react-native
In my specific case I was running npm install in the wrong directory. I thought I was in my project directory but was one level higher. This meant react was missing from installed packages (because there were none) and thus gave this error.
Some steps that worked for me:
1. watchman watch-del-all
2. rm -rf node_modules
3. npm install react#15.0.2 --save
4. npm install react#15.1.0 --save
5. npm install
6. rm -fr $TMPDIR/react-*
7. npm start -- --reset-cache
In my case, the project I am working on requires a specific version of React. Since it was older than the current release, doing an install/update would still cause the error.
In order to fix the problem, I had to check the package.json of the project and install the exact version allowed by the dependency definition. In the OP's case, a
npm install react#15.0.2
should fix the problem by installing the exact version of the React module that react-native requires.
Verify that the condition was resolved by doing a npm list to see if there are any other unmet peer dependencies.

isActive lib cannot be found

i am building an app that uses react-router,flux and i found this library called redux-auth(https://github.com/lynndylanhurley/redux-auth). I am trying to use it since it has a lot of work done regarding loging,sign up, etc.
I installed the dependencies with npm in this order - >
npm install redux-auth --save
npm install material-ui --save
npm install react-tap-event-plugin
After this i got the error i mention, the module isActive cannot be found.
So i searched the web and found this post:
https://github.com/acdlite/redux-router/issues/111
Where they fix it with this command: npm install --save history react-router#latest followed by npm install --save redux-router#1.0.0-beta3
After this my app broke, and now i get the error : "Error: ajax not supported in this browser" when prerendering Router with / and {}
The line with such error: <%= react_router 'Router', 'HistoryLocation', {}, { prerender: params[:noprerender].nil?, prerender_location: root_path } %>
Tried uninstalling such libraries but didn't work out, tried removing the node_modules dir and rebuilding with npm but didn't work.
Any help or advice? is impossible for me to use this library? is it maybe a compability problem between flux and redux? Any help is welcome.
Edit #1 : I am using Chrome.

Resources