Comments (21)
I think I see what the code is doing and will have a look at implementing this if no-one else is working on it?
from learn.
In the original freeCodeCamp app, get-words.js
generates greetings from words.json
. get-words.js
's randomCompliment
function is then used but I don't really know how. Here, the “Happy coding!” message is defined and then exported to be reused here.
from learn.
Hi @thomaskuntzz thanks for taking the time to look into this. It seems you have uncovered a bug in freecodecamp/freecodecamp.
We should be updating the successMessage
when the challenge changes. Much like we are doing with challengeMeta
and challengeFiles
here in componentDidMount
and here in componentDidUpdate
. In ClassicShow
as well as Project
If I can help you further, let me know 😁
from learn.
I was just taking a look at the code to see if I could help with this, but I don't feel like I can implement this myself, so I just wrote what I understood of how it works right now, just to make the life of whoever will take this on easier 😊
from learn.
Awesome @domwakeling! Let me know if something needs explained better 👍
from learn.
Stupid question probably, but ... can I npm
rather than yarn
, or do I need to install yarn?
from learn.
yarn
and npm install
are equivalent (both package managers are used to do the same opreations and are interoperable) 😉
from learn.
Thanks, wasn't sure if using npm would add a conflict (guess it might add a second lock file?)
from learn.
I would stick to yarn
if I am adding / modifying / removing packages. As long as you are NOT doing that you are good to go.
Also do not add the lockfile to your commit when you make a PR, if you opt for npm.
from learn.
No problem. Can't run the develop script using npm so installing yarn!
from learn.
I know it could be a pain doing it all the time, but changing yarn
for npm run
will get round that for you 👍
from learn.
Think I'd need to change all the scripts in package.json (npm run develop
throws a 'missing package yarn' error). Also apparently some issues with getting yarn via homebrew, and there was me thinking it'd be easy 🙄
from learn.
@domwakeling Copy/paste this into you package.json
.
see more...
{
"name": "learn-freecodecamp-org",
"description": "Gatsby default starter",
"version": "1.0.0",
"author": "Kyle Mathews <[email protected]>",
"dependencies": {
"adler32": "^0.1.7",
"auth0-js": "^9.5.1",
"babel-core": "^6.26.0",
"babel-jest": "^22.4.3",
"babel-standalone": "^6.26.0",
"brace": "^0.11.1",
"chai": "^4.1.2",
"copy-webpack-plugin": "^4.5.1",
"debug": "^3.1.0",
"dotenv": "^5.0.1",
"enzyme": "^3.3.0",
"enzyme-adapter-react-15": "^1.0.5",
"gatsby": "^1.9.243",
"gatsby-link": "^1.6.39",
"gatsby-plugin-google-fonts": "^0.0.4",
"gatsby-plugin-offline": "^1.0.15",
"gatsby-plugin-react-helmet": "^2.0.8",
"gatsby-plugin-react-next": "^1.0.11",
"gatsby-plugin-sitemap": "^1.2.21",
"gatsby-source-filesystem": "^1.5.29",
"gatsby-source-mongodb": "^1.5.19",
"gatsby-transformer-json": "^1.0.16",
"gatsby-transformer-remark": "^1.7.39",
"jest": "^22.4.3",
"lodash": "^4.17.5",
"loop-protect": "^2.1.6",
"mongodb": "^3.0.5",
"react": "16",
"react-bootstrap": "^0.32.1",
"react-dom": "16",
"react-helmet": "^5.2.0",
"react-monaco-editor": "^0.14.1",
"react-redux": "^5.0.7",
"react-reflex": "^2.2.1",
"react-router-redux": "^5.0.0-alpha.9",
"react-test-renderer": "^16.3.1",
"redux": "^3.7.2",
"redux-actions": "^2.3.0",
"redux-form": "5",
"redux-observable": "^0.18.0",
"reselect": "^3.0.1",
"rxjs": "^5.5.7",
"store": "^2.0.12",
"uglifyjs-webpack-plugin": "^1.2.4",
"validator": "^9.4.1"
},
"keywords": [
"gatsby"
],
"license": "MIT",
"scripts": {
"build": "npm run build:frame-runner && gatsby build",
"build:frame-runner": "webpack --config ./webpack-frame-runner.js",
"build:loop-protect": "webpack --config ./webpack-loop-protect.js",
"develop": "npm run build:frame-runner && gatsby develop",
"format": "npm run format:gatsby && npm run format:src && npm run format:utils && npm run lint",
"format:gatsby": "prettier --write './gatsby*.js'",
"format:src": "prettier --write './src/**/*.js'",
"format:utils": "prettier --write './utils/**/*.js'",
"lint": "npm run lint:gatsby && npm run lint:src && npm run lint:utils",
"lint:gatsby": "eslint ./gatsby*.js --fix",
"lint:src": "eslint ./src . --fix",
"lint:utils": "eslint ./utils . --fix",
"pretty": "npm run format && npm run lint",
"test": "npm run format && jest src",
"test:watch": "jest --watch src"
},
"jest": {
"verbose": true,
"transform": {
"^.+\\.js$": "babel-jest"
},
"moduleNameMapper": {
"^.+\\.(css|less)$": "<rootDir>/src/__mocks__/cssStub.js"
}
},
"devDependencies": {
"babel-eslint": "^8.2.2",
"enzyme-adapter-react-16": "^1.1.1",
"eslint": "^4.19.1",
"eslint-config-freecodecamp": "^1.1.1",
"eslint-plugin-import": "^2.9.0",
"eslint-plugin-prefer-object-spread": "^1.2.1",
"eslint-plugin-react": "^7.7.0",
"prettier": "^1.11.1",
"sinon": "^4.5.0"
}
}
from learn.
sigh
Sorry about this; I'm now hitting an error message which (essentially) is complaining about a spread operator (...file
in line 78 of seed/buildChallenges.js
). Have tried using both npm and yarn (complete uninstall and fresh clone, install etc) and getting it both ways. Could this be a babel issue?
from learn.
https://yarnpkg.com/en/ and follow installation instructions
Ignore that, you are using homebrew. I have had the same setup.
from learn.
Which version of node are you using @domwakeling? It should be version 8+ to use the object spread operator
from learn.
Looks like noob issues. node -v
returns v6.9.1 but running brew upgrade node
returns 'node 10.1.0 already installed'. Is there some easy way to fix this or do I need to install nvm?
from learn.
I have found nvm
being the best option when working with node versions 👍
from learn.
OK, thanks. Another odyssey coming up!
from learn.
Hi @domwakeling Lets keep the issue thread clean for issue specific discussions, and continue on
Contributors Chat room for troubleshooting.
from learn.
Fix proposed in PR #41
from learn.
Related Issues (20)
- Accept value 0 without measure unit HOT 1
- Random quotes for 404 page flickers HOT 10
- Flash message hard to read in night mode. HOT 1
- Improve the "ask for help" forum post autopopulation functionality HOT 1
- Error in comment in a JS regex page HOT 3
- "Map is not a function" in a Rosetta Code problem HOT 4
- "Responsive Web Design Principles: Create a Media Query" test is not forgiving. HOT 1
- Support for curriculum challenge translations HOT 1
- Dasherize in learn HOT 1
- News page link not in navigation bar on learn.freecodecamp.org HOT 1
- curriculum - insert category on HTML5
- Cannot see the curriculum
- Profile picture overflow
- All challenges which test if something is console.logged are not working HOT 2
- [CI Tests] Add test for challenges that use `console.log`
- [CI Tests] Define a test suit that can handle unit -> integration -> e-2-e tests
- Update package.json so @freecodecamp/curriculum in recent version 3.1.2 or later
- Better install instruction for Learn
- Learn platform doesn't work on Edge Browser Windows 10
- Streak being shown wrong
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from learn.