I just opened my react native apps, and then my js file turned out like this.
But when i run the apps, it worked perfectly.
tried to disable prettier but still, and tried to quick fix but still same.
this came from eslint click Quick Fix or run this command:
npx eslint --ext=.js,.jsx --fix
Related
So here I was working away on my NuxtJS SPA and after a page refresh, I started getting these errors. I have no clue where this comes from I did not change anything that could cause it. I tried everything including npm fixing and reinstalling the projects node_modules. Nothing works. What the hell is this? Even if I do what npm suggests, nothing works. Anyone knows what this is about?
more errors
Turns out that I accidentally accepted the IDE suggestion for a code fix and I did not notice that. The IDE imported a random library that broke everything.
So apart from removing that the solution is to commit often and using git bisect to find the problem.
The tutor of my video tutorial compiles javascript/react on save with his VS Code editor. Mine dont.
How can I config VS Code to do this?
Remark:
I find solution for typescript "Visual Studio Code - compile on save", but suggested solution does not work for me.
#added information:
the project is created with create.react-app. npm start opens chrome, and compilation errors are then shown in Chrome's DEV-Console, as noted by Shishani . My tutor has the code compiled on VS Code Terminal console. This offers a quick check of the code compilation before I go to webbrowser, to check for errors there, which seems to me much more intimidating with it's long callstacks.
If you create your React project with create-react-app, and then start it with npm start, it compiles automatically on save. Also, if it's not a React project, but just JS/HTML/CSS, you can open your project with the "Live Server" extension in VSCode, and it will update your page every time you save a file in your VSCode workspace.
You can even do like I do, and enable constant autosave, with the AutoSave: afterDelay setting in VSCode (if you dare), and then set the save delay to a super small number (mine is 2ms) so you don't even need to hit save anymore (go to File>Preferences>Settings>[Search "Auto Save"]).
If you have created react project using there official cli tool (create-react-app) then on saving js files it gets re-compile. This is because they are using webpack bundler behind the scene.
If you have created normal html or js files without any such cli tools then it won't work directly, You have to use some kind of bundler with dev-server support to do it.
Parcel! is a great bundler to use without configuration
I initialized a react native project. It installed with 0.45.0 version of react-native.
XCode isn't able to build it.
There is a problem with config.hpp file.
Error is highlighted in red color, which says "'boost/config/user.hpp' file not found"
Been struggling with this issue all day today. Looks like there might be something in the latest version of react-native that is causing the build issues. And I tried just about everything to fix it.
Not sure what the long-term solution is, but I just rolled back to 0.44.0 and that seems to be working for me as a temporary fix.
react-native init MyAwesomeApp --version react-native#0.44.0
delete $APP_DIR/node_modules/react-native/third-party/glog-0.3.4
download glob-0.3.5 from https://github.com/google/glog replace glob-0.3.4
I'm using angular2 with Visual Studio 2015.
I completely new at angular2 so I'm discovering it step by step, right now I have an app.component.ts, displaying in html file, and everything works but when I'm making changes like the content of template in the typescript file nothing's moving, I style have the older content I tried to rebuild the project, close the project and re open it, tried to disable the cache like said in a topic but nothing works, what am I missing ??
You need to compile the typescript to javascript in order to see the changes. Simply run npm tsc in your console and your script will compile.
In case you are using command line I would suggest to install #angular/cli package. If you use ng serve your app will automatically reload if you change any of the source files.
When I run react-native start or npm start the packager starts and prompts to be Looking for JS files in /Users/map/repos/myrepo/
I've got Hot reloading enabled. When I change a file located within /Users/map/repos/myrepo/node_modules/react-native/ seems to detect the change, however if I edit a file in a third party repository like /Users/map/repos/myrepo/node_modules/react-native-menu/ looks like watchman is not detecting the change.
I've just upgraded React Native in my project to 0.39 and I think this wasn't the default behavior before. I've set up some logging in react-packager/src/node-haste/index.js and seems react-native-menu files are included in hasteFSFiles, however change event is not triggered.
I've tried deleting node_modules and reinstalling it, Cleaning Watchman state and other without luck.
Ok, Looks like they redid React Native packager in version 0.39, although this bug is still present in v0.40. Until there is an official fix, if you want to detect changes of a library within node_modules you need to edit node_modules/react-native/packager/defaults.js and add your project name to providesNodeModules, like this:
exports.providesModuleNodeModules = [
'react-native',
'react-native-windows',
'react-native-menu',
];
The issue where this has been reported can be found here:
https://github.com/facebook/react-native/issues/11301
Another solution is to start react native packager with additional arguments
npm run start -- --providesModuleNodeModules react-native,{any_node_module}
Works with RN v0.42.0 for me