i have troubles updating the new version of react-native which appears to improve vastly and a lot of features.
After reading this article :
https://facebook.github.io/react-native/blog/2018/07/04/releasing-react-native-056
I've started to run this command : https://facebook.github.io/react-native/docs/upgrading.html
All goes well, the application is built after running react-native run-ios
The problem is the bundle which is buggy :
node node_modules/react-native/local-cli/cli.js start "--reset-cache"
Scanning folders for symlinks in
/Users/julestruong/Dev/BAP/flex/v1/flex-mobile-app/node_modules (14ms)
warning: the transform cache was reset.
Cannot find module 'metro/src/transformer'
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! flex#0.0.1 start:
node node_modules/react-native/local-cli/cli.js start
"--reset-cache" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at
the flex#0.0.1 start script. npm ERR! This is probably not a problem
with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
Tries :
remove node_modules
start --reset-cache
delete package-lock.json and reinstall.
Nothing works ...
If you're using typescript you'll need to upgrade react-native-typescript-transformer to 1.2.10 since metro moved the transformer it relies on.
Related
I've got some problem with starting app by using 'npm start'. After create react files folder and using that command I can see:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! weatherapp#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the weatherapp#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I want to add that I've used react before. I was running code the same way but everything was good. What's the solution?
Make sure you are writing the npm start command to correct package where your package.json resides.
More likely it seems you don't have react script installed.
Can you try installing script with following command.
npm i react-scripts
This may solve your problem. Happy learning :)
Try to remove node_modules and package.log or yarn.lock file also. and run npm install again. Should solve your problem.
I am trying to run a hellow world app in LWC open source and after "npx create-lwc-app my-app" when I cd in the dir and run "npm run watch" I get the below error.
E:\Development\LWC\workspace\dev>npm run watch
> dev#0.0.0 watch E:\Development\LWC\workspace\dev
> lwc-services watch
'lwc-services' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! dev#0.0.0 watch: `lwc-services watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the dev#0.0.0 watch script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ABC\AppData\Roaming\npm-cache\_logs\2019-12-24T16_31_47_970Z-debug.log
Have tried to install "npm install --global --production windows-build-tools" again, trierd to manually install npm i lwc-services -g but it has an error 'rollup-plugin2.02 is dprecated update your dependency' but I donot know if that is the issue here , reistalled the nmp but still not working.
You may try running 'npm run watch' after 'npm i' command.
The same issue has been asked here
I was instructed to do npm install -g lwc-services. There were several warnings, including "deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies."
That one seemed more serious than all the others, so I did npm install chokidar. That came in without any problems. Then I retried the previous command. I don't know if the Chokidar was such a big problem, but at least I was able to do the basic exercises and catch up with the rest of the class.
*npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! github#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the github#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:*
or sometimes I am different kind of errors just after creating the app. which means no modifications to the default automatic generated project.
and I managed to solved it.
the issue seems to be with my Yarn. incomplete uninstall or something like that. can't solve it by just reinstalling Yarn or uninstall it again. because of that, NPM create-react-app also create bugs, which IDK how.
but the solution is amazing, I just created the project in a different folder. trust me I'm not lying , different location do works in NPM. so I believe I need to format my computer to solve this 100%.
The cause maybe due to I have installed create-react-app via NPM globally and tries to install Yarn create-react-app.
anyway, by using a different folder location, my issue was fixed completely.
I am trying to implement css modules running 'npm run eject' but I am getting errors
I ran "npm run eject" after making git commit. Now I am stuck with some errors that looks like am missing something but I cant figure it out yet.
This is the log of errors I get after running npm run eject
Remove untracked files, stash or commit any changes,
and try again.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-app#e.l.e eject:
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-app#e.l.ΓΈ eject script.
npm ERR! This is probably not a problem with npm.
There is likely addi
npm ERR! A complete log of this run can be found
in:
npm ERR!
CSS Modules are already supported in React (reference).
You don't need to run npm run eject anymore (unless your aim is to still customize some things yourself).
Just name your css file like this: [name].module.css
It seems you have some untracked by Git. From the error log you can find few ways of the problem solving:
1) add files to new commit using terminal:
git add .
git commit -m 'some message'
2) if you don't need untracked file, you have to find and delete them
I am new to React and I am trying to build a react app using create-react-app and Watson node-sdk. Everything works fine in development mode after running npm start. But when I try to build a production package using npm run build and below is the error I receive.
e:\Microsoft\Workspace\React\myapp>npm run build
> myapp#0.1.0 build e:\Microsoft\Workspace\React\myapp
> react-scripts build
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/watson-developer-cloud/lib/helper.js:31
Read more here: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! myapp#0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the myapp#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional
logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\yk\AppData\Roaming\npm-cache\_logs\2017-09-
20T09_40_36_144Z-debug.log
The line that giving error is let missing; and seems like the let is causing the issue. Is there anything I can do with this?
Encountered this problem today. the doc suggests some solutions:
Open an issue on the dependency's issue tracker and ask that the package be published pre-compiled.
Fork the package and publish a corrected version yourself.
If the dependency is small enough, copy it to your src/ folder and treat it as application code.
Read more here: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify