All Questions
Tagged with npm-scripts react-native
16 questions
0
votes
1
answer
70
views
Setup Configuration: Node.js / "npm start" doesn't work
npm command running in project path
Hello Developers,
I am trying to run the node.js commands - npm start and setting up a project with firebase the help of this article.
I have installed node.js ...
0
votes
0
answers
2k
views
Could not resolve project :react-native-video. Required by: project :app > No matching configuration of project :react-native-video was found
#Bug
**Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
Could not resolve project ...
2
votes
1
answer
941
views
How do you pass an environment variable from a script to a React Native file?
I feel like I'm doing everything right but I must be going wrong somewhere. I'm not using Expo or create-react-app. I'm on a Macbook.
First, I run npm run start, which runs a script. The script looks ...
2
votes
2
answers
285
views
Is there any way to update a devDependency version of a nested dependency?
In a react-native project, there is mocha (9.2.0) as a devDependency like the following -
react-native-svg -
"dependencies": {
"css-select": "^5.1.0",
"css-tree&...
0
votes
2
answers
1k
views
How to resolve 'Failed to minify the code from this file' error while running 'npm run build'
I am getting an error while running npm run build. It was running before, there were no new changes in the package.json file still it will fail. Below is the error that I got
I searched for this ...
1
vote
0
answers
9
views
Passing consolidated config file to native sdks
I'm working on a react native module that has native iOS & android sdks, the sdks have their own respective config files that I'd like to consolidate into one in react native but I'm having a hard ...
0
votes
1
answer
2k
views
Variable from .env in a React Native package.json script
I have a React Native application and for some secrets I use react-native-dotenv. How can I put a variable from my .env in a script from my package.json?
For example: "myScript": "run ...
0
votes
1
answer
1k
views
How to run npm postinstall script only on MacOS
How can a postinstall script be restricted to run only on macOS?
I have a shell script inside my React native library and it needs to be started when the npm install has completed.
This works great ...
1
vote
1
answer
1k
views
Hiding the API key in React
We have an application that uses an API key (Accesstoken). We would like to hide the API key in a .env file.
We have gone through the following steps.
Created a .env file in the source folder (with ...
1
vote
1
answer
2k
views
Command 'yarn build' fails on Windows 10 for REACT_APP_RELEASE variable
Inside package.json the build script is something like:
"build": "REACT_APP_RELEASE=$npm_package_version REACT_APP_COMMIT_REF=$COMMIT_REF react-scripts build && echo $COMMIT_REF ...
1
vote
2
answers
3k
views
React Native Link for React Native .60 +
This is still something that is required, I see this message all the time, but it's completely invalid from what I have experienced. Almost every package I work with, I still have to run the react-...
1
vote
0
answers
345
views
View config not found for name RNSketchCanvas
To draw on image in a react native application ,I have used the below
npm module
npm install @terrylinla/react-native-sketch-canvas --save
To implement the module I followed the steps mentioned in ...
0
votes
1
answer
79
views
react native lint critical failed?
After running npm run lint:critical, it came back with one error, that is this:
61:26 error Unexpected 'this' no-invalid-this
the function ask for the user ...
1
vote
2
answers
2k
views
error: bundling failed: Error: Couldn't find preset "module:metro-react-native-babel-preset" relative to directory "C:\\Users\\..."
Im new to react-native. I keep getting this error when I run
react-native run-android
This is my last package.json, that was working Ok the last time I pushed changes but now it seems to have ...
3
votes
4
answers
3k
views
In Expo, Requiring module "fetch", threw an exception: ReferenceError: Can't find variable: self
I have searched across different possible answers, but didn't find any appropriate addressing this specific error.
I have mentioned the exact error string in the question title. This error started ...