React Tailwind - not able to start my app - javascript

I was trying to use Tailwind css with react project, i followed the exact instructions on Tailwind website on how to use Tailwind in React but when trying to run npm run start it displays :
Failed to compile.
EIO: i/o error, read
did anyone ever faced this, ad please how to solve this ?

When this kind of unexpected errors arise without any logic reason at all, it's recommended to follow these steps:
Check if you got npm's latest version installed and if you don't upgrade it.
Delete your node_modules folder.
Reinstall all the packages using npm install.

Related

Importing module returns null using expo

I'm trying to import a compass module without success using expo and react native
LINK to library
The error appears when I uncomment the import line, which gives me the error:
import RNSimpleCompass from 'react-native-simple-compass';
null is not an Object (Evaluating 'RNSimpleCompass.start')
I basically install the library using the provided instructions:
npm install react-native-simple-compass --save
I also tried linking it
npx react-native link react-native-simple-compass
then I run
npm start
which starts expo and gives me the error
I usually install and run other npm packages without problem, but this one keeps complaining when importing it.
I checked that the library is in my package.json dependencies. I even tried deleting the node_modules folder and re running npm install to reinstall all dependencies, but the error persist.
Am I missing something?
When you have expo "managed" project (without "ios" and "android" directories) you can't use react-native libraries that contain native code(objc or java). It worked in other cases because you probably were adding js only libraries or libraries that are explicitly supported by expo.
If you want to use that library you would need to eject to bare workflow(expo eject). You will still have access to all expo libraries you are currently using, but you won't be able to build it on Expo servers.

Error when building next.js app: Can't resolve 'next/head'

I am getting the below error when doing next build in my next.js app, after it's been working fine with just next (or npm run dev).
The error:
$ next build
The module 'react-dom' was not found. Next.js requires that you include it in 'dependencies' of your 'package.json'. To add it, run 'npm install --save react-dom'
Creating an optimized production build ...
> Using external babel configuration
> Location: "../.babelrc"
Failed to compile.
./pages/_app.js
Module not found: Can't resolve 'next/head' in '../pages'
> Build error occurred
Error: > Build failed because of webpack errors
at build (.../AppData/Roaming/npm/node_modules/next/dist/build/index.js:7:847)
I started my project by cloning Material UI's next.js example and just use that as it seems updated:
https://github.com/mui-org/material-ui/tree/master/examples/nextjs
However, thinking I just may of have an outdated or broken build, I re-cloned the next.js example and did next build as well, without modifying any files and I get the same error.
How can I fix this?
I just cloned that next.js example and it worked both with npm run dev, as well as npm run build->npm run start.
Judging by your error, I would check that "react-dom": "latest" is present in your package.json's dependencies. Did you run npm install after cloning the example?
The solution to this problem is to Just rerun these two commands again then your project will successfully Run. I also faced this problem but I got the solution.
npm i
yarn install
I ran into a similar problem when I included my nextjs app in a yarn workspace. I got around the issue by deleting the following directories in my nextjs app:
node_modules
.next
build
After removing them I ran yarn from the repo directory and started the nextjs app back up and it was working again.

Laravel Vue.js application not running

I have a serious problem on running Laravel + Vue.js new applications. I tried that on a 50% developed app and also on a brand new Laravel instalation and that shows the same error. After installing the Laravel and going into php artisan serve i start a common routine to start Vue.js within that Laravel application, which means NPM RUN INSTALL and right after NPM RUN DEV. This is what the errors show me:
I have tried all possible solutions found on previous posts on Stack Overflow and Github but the error persists. I have a node version 10.15.1 and the latest Laravel scaffold. Any thoughts on what might be happening? Im at the point of giving up using a scaffold Vue.js and instead using it as stand alone.
Thank you!
It seems like, It fails while vue-template-compiler package getting install through yarn.
It might be issue with yarn in your system.
Try to first install vue-template-compiler through NPM:
npm install vue-template-compiler
Then try again with npm run dev.
I hope this will help.

IntelliJ Idea React-native not working properly

I have recently installed intellij idea on my PC and started react-native application. I installed all libraries required for react native and react js. Also installed node js module and all plugins for this ide. Still i am getting error below like this in import statement.
When i move to that line that shows me error like.
-> Install TypeScript definition for better type information.
But my typeScript definition are also as per required.
Also I have changed my JS to ReactJSX.
I have attached image over here for reference.
You should try to create a new project using following commands
npm install -g create-react-app
create-react-app my-app
cd my-app
npm start
If you still facing error then try to use vscode editor and select react language. If you still face issue let me know

What does it mean when ngAnnotate says "Cannot create property '$methodName'..."

I am in a bad situation. I need to make some small changes to a complex web application that I did not write myself. However, to begin with I cannot even get the application to build.
The project is using grunt to build the application. But when I run it I get the following error:
Running "ngAnnotate:dist" (ngAnnotate) task
Warning: Cannot create property '$methodName' on boolean 'false' Use --force to continue.
Aborted due to warnings.
Does anyone have a clue what this means and how I can fix it?
Note: If I run grunt --force it does complete building but the result looks all weird and is not functional.
I should probably add that I am pretty unfamiliar with web development, including with grunt.
There was some issue with older ngAnnotate package. grunt-ng-annotate depends on ngAnnotate. So you will have to update the grunt-ng-annotate package.
You can do so using "update grunt-ng-annotate" command in your project directory or by changing version to latest version in package.json then run npm install
Here is the link for the issue: https://github.com/olov/ng-annotate/issues/139
Hope it helps.

Categories

Resources