bit of a bizarre one, Gulp doesn't seem to work as expected. It loads tasks for one of my modules, however it doesn't seem to load for my other module. I have tried your standard npm audit then npm audit fix --force however this doesn't resolve it. Process 1:
Task 2:
When attempting to do Ctrl+Alt+O the only help I seem to get is the npm audit
Anyone got any ideas? This is not due to an issue with the file. This works for many others which use the software, and I can access the file fine. I did originally have issues with IIS certificates, however I generated my own IIS one.
Related
For some context, I am a web developer by day, but in the evenings, I work on a personal project using React Native, and I'm still fairly new to it. The app was working totally fine up until a couple of days ago, and I'm not entirely what caused it. Even if I revert back in GitHub, things still do not work.
Things that I think have caused it are:
Running 'npm audit fix --force'
Or updating node, npm, or expo-cli
What I've tried so far:
I've gone back to a previous commit where the app was definitely working, tried to start the app ('expo start'), but to no avail
I've made sure the package.json, package-lock.json, and yarn.lock were all reverted, and then ran 'npm install', and the yarn equivalent (I'm aware you shouldn't mix package managers but this has been like it even when the app was working, so fairly sure this isn't the issue)
Un-ignored node_modules/ in .gitignore, then deleted them from the project, and ran 'npm install', and yarn equivalent
Tried clearing all caches (npm, metro etc.)
'expo doctor --fix dependencies'
Tried reverting expo-cli to a previous version, same with npm and node
Debugged the app with remote debugger in Chrome which I'll explain below...
Symptoms of the issue:
It seems to be at build time (I think?) because the app never makes it to any kind of components or screens:Error in iOS simulator when I try to serve my app using 'expo start' and 'i'
r/reactnative - how can I fix my app after 'npm audit fix --force'
Error in iOS simulator when I try to serve my app using 'expo start' and 'i'
The message I'm getting is 'no stack', because of a "}" symbol (pics will be included), and when I trace this down to its root using the remote debugging in chrome, the caught exception that it paused on was something like 'can't use import statement outside of a module', and the line seems to be referring to Babel module:Using Expo remote debugger in Chrome
r/reactnative - how can I fix my app after 'npm audit fix --force'
Using Expo remote debugger in Chrome
When I try to serve the app on web, I get a different Webpack related error (please see screenshots)
I won't put my package.json etc. here because it'll be a wall of text, but here's my repo if anyone would like to see the dev dependencies etc.: https://github.com/braingame-com/bg1
This has caused me so much frustration that I considered just rebuilding the app from scratch because it's not very far along anyway, but I'm really wanting to get my debugging skills up and learn what I had done wrong, rather than taking the easy way out.
What can I try next?
I’m having this issue with npm where I cannot install the packages in my package.json on my home network. I tried countless “fixes” (including modifying the registry to http instead of https, modifying the proxy and https-proxy, using unsafe-perm, installing the packages individually, etc.) but none of them seem to work. I decided to try installing them while connected to my phone’s LTE hotspot and miraculously it worked normally. Now my next issue is, what could be causing this?
When I install on my network, it starts to slow down and then completely stops and hangs (on a random package). After a few tries, I was able to install yarn, and could install my dependencies with it.
Extra info:
I tried this on multiple node/npm versions but still hangs
Verbose install on npm doesn’t give much information, but usually hangs here [.....] \ extract:rxjs: sill extract rxjs#6.3.3 extracted to /home/abbas/git/abbas-yadollahi/node_modules/.staging/rxjs-36adb757 160099ms
My network is fine as far as I know (50/10 up/down and I’m on LAN)
I'm a little confused as to why I can't get my Gruntfile.js to run, here's the rub:
I installed grunt globally using npm. It lives in my /usr/local/bin/ directory, here it is:
Previously, I'd installed node.js using homebrew, then grunt with npm. Other issues led me to uninstall node via homebrew & reinstall node directly from the disk image node provides.
In my web project's index, there's a Gruntfile.js script that rebuilds my jekyll site everytime live-reload updates. When I run grunt, I get this message:
What I'm trying to wrap my head around:
Why isn't /usr/local/bin/grunt a valid path? Grunt exists at that location. My guess was that running grunt locally, from within my website's index, would fix things.
There's a node_modules folder there & everything was working fine before after all. I found this link, and tried running \grunt to bypass the bash alias, but that had no effect.
Any advice/suggestions are much appreciated! I feel like an imbecile using things, breaking things & not understanding why/how. Eager to finish my project, get a paycheck & finally have time to learn the ins and outs of terminal, bash & popular package managers so I don't run into these sorts of problems...
After discussion with OP, I find this is a Node.js environment issue. After install - do something - uninstall - reinstall in another way - do something, somehow, when npm install -g XXX is executed, the symbolic link is created and point to some place, but the package is installed some where else. That's why OP see /usr/local/bin/grunt but cannot run it.
I've recommended OP to clean up all Node.js stuff, make a clean environment and start right from the beginning.
My project is successfully deployed via CI and working fine. But when I build it from the same commit locally, the project freezes without any error message. It's a huge Ember app with an enormous pipeline, and I've exhausted all my debugging ideas.
My only guess so far is that an npm subdependency update has broken something. I don't know which package is to blame. :(
I have no npm-shrinkwrap.json. I tried to introduce shrinkwrapping to the team, but it was causing too much trouble, so we went back to not using it.
No other team member has an up to date version of the project locally, so I don't have anyone to ask for a fresh npm-shrinkwrap.json.
I know the date at which the project was building correctly.
How do I tell npm to install every package (including subdependencies) limited by a date (in addition to restrictions specified in package.json files)?
If I were able to do that, I could see if the project starts working again. If it does, I could shrinkwrap and identify the troublesome package.
Any other suggestions to recover from this failure are also very welcome.
PS I'm using NVM, so I've tried both npm v2 and v3 -- same result.
I'm trying to create a custom build with core-js. Per the documentation, I first ran
npm i core-js && cd node_modules/core-js && npm i
which seemed to be fine. Then, also per the docs I tried
C:\GIT\coreJS_Custom\node_modules\core-js>npm run grunt build:es6.array.from -- --library=on --path=custom uglify
and lots of variations on that theme. It seems to run briefly, with no output at all, and I can't seem to find any generated file. What am I doing wrong?
Also, the above commands were run on the Windows 8.1 cmd terminal.
What's particularly interesting (and frustrating) is that running this
C:\GIT\coreJS_Custom\node_modules\core-js>npm run grunt kjhgjhghkghh
Similarly runs briefly and then seems to succeed.
I'm not sure what my root problem is, but for me, running the grant task on its own, without npm run did the trick
So something like this should be the final product.
C:\GIT\coreJS_Custom\node_modules\core-js>grunt build:es6.array.from --library=on --path="es6-array-from-build-min2" uglify