Because I go back and forth between the master
branch (to test PRs hitting master) and next-curriculum
(to work on the project-based curriculum), sometimes in the same day I will go back and forth 2-3 times. As recent as two days ago, I was able to successfully run npm ci
and npm run develop
on the latest master
branch with no issues.
I am not exactly sure what PR merged to cause me trouble on my Windows machine, but even after doing the following:
cp sample.env .env
npm run clean
npm ci
I still get the error shown at the bottom after npm ci
executes. I even tried deleting the repo locally, re-cloning it, and following all the docs steps again, but still get the error. It seems to be related to node-gyp
.
OPT@HP-PC MINGW64 /d/coding/fcc (master)
$ npm run clean
> @freecodecamp/[email protected] clean D:\coding\fcc
> npm-run-all clean:client clean:server clean:packages
> @freecodecamp/[email protected] clean:client D:\coding\fcc
> cd ./client && npm run clean
The system cannot find the path specified.
> @freecodecamp/[email protected] clean D:\Coding\fcc\client
> gatsby clean
info Deleting .cache, public
info Successfully deleted directories
> @freecodecamp/[email protected] clean:server D:\coding\fcc
> shx rm -rf ./api-server/lib
> @freecodecamp/[email protected] clean:packages D:\coding\fcc
> lerna clean -y
lerna notice cli v3.22.0
lerna info versioning independent
lerna info clean removing D:\coding\fcc\api-server\node_modules
lerna info clean removing D:\coding\fcc\client\node_modules
lerna info clean removing D:\coding\fcc\client\plugins\fcc-source-challenges\node_modules
lerna info clean removing D:\coding\fcc\client\plugins\gatsby-remark-fcc-forum-emoji\node_modules
lerna info clean removing D:\coding\fcc\client\plugins\gatsby-remark-node-identity\node_modules
lerna info clean removing D:\coding\fcc\curriculum\node_modules
lerna info clean removing D:\coding\fcc\search-indexing\node_modules
lerna info clean removing D:\coding\fcc\tools\challenge-md-parser\node_modules
lerna info clean removing D:\coding\fcc\tools\scripts\build\node_modules
lerna info clean removing D:\coding\fcc\tools\scripts\seed\node_modules
lerna success clean finished
OPT@HP-PC MINGW64 /d/coding/fcc (master)
$ npm ci
npm WARN prepare removing existing node_modules/ before installation
> [email protected] install D:\coding\fcc\node_modules\fsevents
> node-gyp rebuild
D:\coding\fcc\node_modules\fsevents>if not defined npm_config_node_gyp (node "C:\Users\OPT\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\OPT\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Traceback (most recent call last):
File "C:\Users\OPT\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 50, in <module>
sys.exit(gyp.script_main())
File "C:\Users\OPT\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 554, in script_main
return main(sys.argv[1:])
File "C:\Users\OPT\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 547, in main
return gyp_main(args)
File "C:\Users\OPT\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 532, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "C:\Users\OPT\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 2030, in GenerateOutput
sln_projects, project_objects, flat=msvs_version.FlatSolution())
File "C:\Users\OPT\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1787, in _GatherSolutionFolders
return _DictsToFolders('', root, flat)
File "C:\Users\OPT\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1740, in _DictsToFolders
for folder, contents in bucket.items():
AttributeError: 'MSVSProject' object has no attribute 'items'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\OPT\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:311:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\OPT\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\coding\fcc\node_modules\fsevents
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
> [email protected] install D:\coding\fcc\node_modules\husky
> node husky install
husky > Setting up git hooks
husky > Done
> [email protected] postinstall D:\coding\fcc\node_modules\husky
> opencollective-postinstall || exit 0
Thank you for using husky!
If you rely on this package, please consider supporting our open collective:
> https://opencollective.com/husky/donate
> [email protected] postinstall D:\coding\fcc\node_modules\core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> [email protected] postinstall D:\coding\fcc\node_modules\docsify
> opencollective-postinstall
Thank you for using docsify!
If you rely on this package, please consider supporting our open collective:
> https://opencollective.com/docsify/donate
> [email protected] postinstall D:\coding\fcc\node_modules\cypress
> node index.js --exec install
Note: Skipping binary installation: Environment variable CYPRESS_INSTALL_BINARY = 0.
> @freecodecamp/[email protected] postinstall D:\coding\fcc
> npm run bootstrap
The system cannot find the path specified.
> @freecodecamp/[email protected] bootstrap D:\coding\fcc
> lerna bootstrap --ci
lerna notice cli v3.22.0
lerna info versioning independent
lerna info ci enabled
lerna info Bootstrapping 10 packages
lerna info Installing external dependencies
lerna ERR! npm ci exited 4294963245 in '@freecodecamp/curriculum'
lerna ERR! npm ci stderr:
The system cannot find the path specified.
npm WARN tarball tarball data for [email protected] (sha512-swhsdpNpyXg4GbM6LpOQ6qaloQuIKizZ+Zh6JPXJQc59ka49100Js0WvZx594iaKSoFgkFq2s8uXFHS3/Xy2WQ==) seems to be corrupted. Trying one more time.
npm WARN tar ENOENT: no such file or directory, open 'D:\coding\fcc\curriculum\node_modules\npm\node_modules\fs-write-stream-atomic\.npmignore'
npm WARN tar ENOENT: no such file or directory, open 'D:\coding\fcc\curriculum\node_modules\npm\node_modules\function-bind\.npmignore'
npm WARN tar ENOENT: no such file or directory, open 'D:\coding\fcc\curriculum\node_modules\npm\node_modules\ip\.npmignore'
npm WARN tar ENOENT: no such file or directory, open 'D:\coding\fcc\curriculum\node_modules\npm\node_modules\object.getownpropertydescriptors\.npmignore'
npm WARN tar ENOENT: no such file or directory, open 'D:\coding\fcc\curriculum\node_modules\npm\node_modules\promise-retry\.npmignore'
npm WARN tar ENOENT: no such file or directory, open 'D:\coding\fcc\curriculum\node_modules\npm\node_modules\promzard\.npmignore'
npm WARN tar ENOENT: no such file or directory, open 'D:\coding\fcc\curriculum\node_modules\npm\node_modules\sorted-union-stream\node_modules\string_decoder\.npmignore'
npm WARN tar ENOENT: no such file or directory, open 'D:\coding\fcc\curriculum\node_modules\npm\node_modules\verror\.npmignore'
npm WARN tar ENOENT: no such file or directory, open 'D:\coding\fcc\curriculum\node_modules\npm\node_modules\is-symbol\.nvmrc'
npm WARN tar ENOENT: no such file or directory, open 'D:\coding\fcc\curriculum\node_modules\npm\node_modules\es-abstract\.nycrc'
npm WARN tar ENOENT: no such file or directory, open 'D:\coding\fcc\curriculum\node_modules\npm\node_modules\performance-now\.tm_properties'
npm WARN tar ENOENT: no such file or directory, open 'D:\coding\fcc\curriculum\node_modules\npm\node_modules\json-schema\draft-03\examples\calendar'
npm WARN tar ENOENT: no such file or directory, open 'D:\coding\fcc\curriculum\node_modules\npm\node_modules\json-schema\draft-03\examples\card'
npm WARN tar ENOENT: no such file or directory, open 'D:\coding\fcc\curriculum\node_modules\npm\node_modules\umask\ChangeLog'
npm WARN tar ENOENT: no such file or directory, open 'D:\coding\fcc\curriculum\node_modules\npm\node_modules\json-schema\draft-03\examples\geo'
npm WARN tar ENOENT: no such file or directory, open 'D:\coding\fcc\curriculum\node_modules\npm\node_modules\json-schema\draft-03\examples\interfaces'
npm WARN tar ENOENT: no such file or directory, open 'D:\coding\fcc\curriculum\node_modules\npm\node_modules\json-schema\draft-00\json-ref'
npm WARN tar ENOENT: no such file or directory, open 'D:\coding\fcc\curriculum\node_modules\npm\node_modules\json-schema\draft-01\json-ref'
npm WARN tar ENOENT: no such file or directory, open 'D:\coding\fcc\curriculum\node_modules\npm\node_modules\json-schema\draft-02\json-ref'
npm WARN tar ENOENT: no such file or directory, open 'D:\coding\fcc\curriculum\node_modules\npm\node_modules\json-schema\draft-03\json-ref'
npm WARN tar ENOENT: no such file or directory, open 'D:\coding\fcc\curriculum\node_modules\npm\node_modules\xtend\LICENCE'
npm ERR! code ENOTEMPTY
npm ERR! syscall rmdir
npm ERR! path D:\coding\fcc\curriculum\node_modules\npm\node_modules
npm ERR! errno -4051
npm ERR! ENOTEMPTY: directory not empty, rmdir 'D:\coding\fcc\curriculum\node_modules\npm\node_modules'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\OPT\AppData\Roaming\npm-cache\_cacache\_logs\2020-08-04T23_06_41_266Z-debug.log
lerna ERR! npm ci exited 4294963245 in '@freecodecamp/curriculum'
lerna WARN complete Waiting for 2 child processes to exit. CTRL-C to exit immediately.
npm ERR! code ELIFECYCLE
npm ERR! errno 4294963245
npm ERR! @freecodecamp/[email protected] bootstrap: `lerna bootstrap --ci`
npm ERR! Exit status 4294963245
npm ERR!
npm ERR! Failed at the @freecodecamp/[email protected] bootstrap 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\OPT\AppData\Roaming\npm-cache\_cacache\_logs\2020-08-04T23_07_30_281Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 4294963245
npm ERR! @freecodecamp/[email protected] postinstall: `npm run bootstrap`
npm ERR! Exit status 4294963245
npm ERR!
npm ERR! Failed at the @freecodecamp/[email protected] postinstall 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\OPT\AppData\Roaming\npm-cache\_logs\2020-08-04T23_07_30_335Z-debug.log
I do not have access to my Windows machine any longer to check this, but it seems you need to get node-gyp
working. Here is a article that I found: https://spin.atomicobject.com/2019/03/27/node-gyp-windows might help. Not sure.
What you probably missing are the build tooling of node-gyp
for your platform. On unix its build-essentials
, on macOS its xcode-commandline-tools
and on windows windows-build-tools
I see the same issue.
This seems to be a problem with fsevent (or packages with dependencies on it). As far as I can tell, fsevent is not supposed to build on non-Mac-OSX OSs and it was fixed in fsevent 1.2.13.
Troubleshooting dependencies and reproducing the steps is a pain in the behind, so this is just what I have found to work for me. Updating docsify-cli
from 4.4.0 to 4.4.1 and running npm i jest
, which doesn't update the version but does update the dependencies in the lock file, seems to fix it for me.
fetch latest
npm run clean
npm i docsify-cli // updates it from 4.4.0 to 4.4.1
npm i jest // does not update the version number, but does update the lock file
npm ci // should finish without issues
@RandellDawson Let me know if this works for you, if so we likely just have to bump the dependencies.
I get this error while running npm ci
on Windows 10(v2004)(64 Bit) on current master.
$ npm ci
> [email protected] install D:\xampp\htdocs\gitcontributions\freeCodeCamp\node_modules\fsevents
> node-gyp rebuild
D:\xampp\htdocs\gitcontributions\freeCodeCamp\node_modules\fsevents>if not defined npm_config_-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "Cp.js" rebuild )
Traceback (most recent call last):
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line
sys.exit(gyp.script_main())
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.
return main(sys.argv[1:])
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.
return gyp_main(args)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.
generator.GenerateOutput(flat_list, targets, data, params)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator
root_entries = _GatherSolutionFolders(
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator
return _DictsToFolders('', root, flat)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator
for folder, contents in bucket.items():
AttributeError: 'MSVSProject' object has no attribute 'items'
鈫怺37;40mgyp鈫怺0m 鈫怺0m鈫怺31;40mERR!鈫怺0m 鈫怺0m鈫怺35mconfigure error鈫怺0m
鈫怺0m鈫怺37;40mgyp鈫怺0m 鈫怺0m鈫怺31;40mERR!鈫怺0m 鈫怺0m鈫怺35mstack鈫怺0m Error: `gyp` failed with exit code
鈫怺0m鈫怺37;40mgyp鈫怺0m 鈫怺0m鈫怺31;40mERR!鈫怺0m 鈫怺0m鈫怺35mstack鈫怺0m at ChildProcess.onCpExit (C:\Pjs:351:16)
鈫怺0m鈫怺37;40mgyp鈫怺0m 鈫怺0m鈫怺31;40mERR!鈫怺0m 鈫怺0m鈫怺35mstack鈫怺0m at ChildProcess.emit (events.j
鈫怺0m鈫怺37;40mgyp鈫怺0m 鈫怺0m鈫怺31;40mERR!鈫怺0m 鈫怺0m鈫怺35mstack鈫怺0m at Process.ChildProcess._handl
鈫怺0m鈫怺37;40mgyp鈫怺0m 鈫怺0m鈫怺31;40mERR!鈫怺0m 鈫怺0m鈫怺35mSystem鈫怺0m Windows_NT 10.0.19041
鈫怺0m鈫怺37;40mgyp鈫怺0m 鈫怺0m鈫怺31;40mERR!鈫怺0m 鈫怺0m鈫怺35mcommand鈫怺0m "C:\\Program Files\\nodejs\\nodeyp\\bin\\node-gyp.js" "rebuild"
鈫怺0m鈫怺37;40mgyp鈫怺0m 鈫怺0m鈫怺31;40mERR!鈫怺0m 鈫怺0m鈫怺35mcwd鈫怺0m D:\xampp\htdocs\gitcontributions\fre
鈫怺0m鈫怺37;40mgyp鈫怺0m 鈫怺0m鈫怺31;40mERR!鈫怺0m 鈫怺0m鈫怺35mnode -v鈫怺0m v12.18.3
鈫怺0m鈫怺37;40mgyp鈫怺0m 鈫怺0m鈫怺31;40mERR!鈫怺0m 鈫怺0m鈫怺35mnode-gyp -v鈫怺0m v5.1.0
鈫怺0m鈫怺37;40mgyp鈫怺0m 鈫怺0m鈫怺31;40mERR!鈫怺0m 鈫怺0m鈫怺35mnot ok鈫怺0m
> [email protected] install D:\xampp\htdocs\gitcontributions\freeCodeCamp\node_modules\husky
> node husky install
husky > Setting up git hooks
husky > Done
> [email protected] postinstall D:\xampp\htdocs\gitcontributions\freeCodeCamp\node_modules\husky
> opencollective-postinstall || exit 0
Thank you for using husky!
If you rely on this package, please consider supporting our open collective:
> https://opencollective.com/husky/donate
> [email protected] postinstall D:\xampp\htdocs\gitcontributions\freeCodeCamp\node_modules\co
> node -e "try{require('./postinstall')}catch(e){}"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript
The project needs your help! Please consider supporting of core-js on Open Collective or Patre
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> [email protected] postinstall D:\xampp\htdocs\gitcontributions\freeCodeCamp\node_modules\docsif
> opencollective-postinstall
Thank you for using docsify!
If you rely on this package, please consider supporting our open collective:
> https://opencollective.com/docsify/donate
> [email protected] postinstall D:\xampp\htdocs\gitcontributions\freeCodeCamp\node_modules\cypres
> node index.js --exec install
Note: Skipping binary installation: Environment variable CYPRESS_INSTALL_BINARY = 0.
@lasjorg 's solution worked for me.
@RandellDawson Should we do a chore update to the dependencies/lock file to fix this? Not sure if you tried my suggestion or not but it worked for both me and @Twaha-Rahman
Let me boot up my Windows side and validate the fix works for me.
@lasjorg @Twaha-Rahman After trying the suggested changes, npm ci
completes with no issues. However, I did see the following warning after installing jest
:
$ npm i jest
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
The bad news is, I still get errors when trying to run npm run develop
related to sharp
. The errors showing at the top is only a fraction, because it maxed out my terminal window's output buffer. I tried the suggestion of running npm rebuild --verbose sharp
, but nothing out of the ordinary shows.
h.md unable to parse.
at getEnglishPath (D:\freeCodeCamp\curriculum\getChallenges.js:187:11)
at createChallenge (D:\freeCodeCamp\curriculum\getChallenges.js:134:29)
at buildCurriculum (D:\freeCodeCamp\curriculum\getChallenges.js:89:27)
at EventEmitter.<anonymous> (D:\freeCodeCamp\curriculum\getChallenges.js:47:9)
at EventEmitter.emit (D:\freeCodeCamp\curriculum\node_modules\eventemitter3\index.js:181:35)
at Object.filter (D:\freeCodeCamp\curriculum\node_modules\readdirp-walk\readdirp.js:72:15)
at processFilter (D:\freeCodeCamp\curriculum\node_modules\walk-filtered\index.js:23:91)
at D:\freeCodeCamp\curriculum\node_modules\walk-filtered\index.js:34:5
at FSReqCallback.oncomplete (fs.js:167:5)
(node:12300) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3318)
(node:12300) UnhandledPromiseRejectionWarning: Error: Malformed challenge path, D:\freeCodeCamp\curriculum\challenges\english\10-coding-interview-prep\project-euler\problem-97-large-non-mersenne-prime.english.md unable to parse.
at getEnglishPath (D:\freeCodeCamp\curriculum\getChallenges.js:187:11)
at createChallenge (D:\freeCodeCamp\curriculum\getChallenges.js:134:29)
at buildCurriculum (D:\freeCodeCamp\curriculum\getChallenges.js:89:27)
at EventEmitter.<anonymous> (D:\freeCodeCamp\curriculum\getChallenges.js:47:9)
at EventEmitter.emit (D:\freeCodeCamp\curriculum\node_modules\eventemitter3\index.js:181:35)
at Object.filter (D:\freeCodeCamp\curriculum\node_modules\readdirp-walk\readdirp.js:72:15)
at processFilter (D:\freeCodeCamp\curriculum\node_modules\walk-filtered\index.js:23:91)
at D:\freeCodeCamp\curriculum\node_modules\walk-filtered\index.js:34:5
at FSReqCallback.oncomplete (fs.js:167:5)
(node:12300) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3320)
(node:12300) UnhandledPromiseRejectionWarning: Error: Malformed challenge path, D:\freeCodeCamp\curriculum\challenges\english\10-coding-interview-prep\project-euler\problem-98-anagramic-squares.english.md unable to parse.
at getEnglishPath (D:\freeCodeCamp\curriculum\getChallenges.js:187:11)
at createChallenge (D:\freeCodeCamp\curriculum\getChallenges.js:134:29)
at buildCurriculum (D:\freeCodeCamp\curriculum\getChallenges.js:89:27)
at EventEmitter.<anonymous> (D:\freeCodeCamp\curriculum\getChallenges.js:47:9)
at EventEmitter.emit (D:\freeCodeCamp\curriculum\node_modules\eventemitter3\index.js:181:35)
at Object.filter (D:\freeCodeCamp\curriculum\node_modules\readdirp-walk\readdirp.js:72:15)
at processFilter (D:\freeCodeCamp\curriculum\node_modules\walk-filtered\index.js:23:91)
at D:\freeCodeCamp\curriculum\node_modules\walk-filtered\index.js:34:5
at FSReqCallback.oncomplete (fs.js:167:5)
(node:12300) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3322)
(node:12300) UnhandledPromiseRejectionWarning: Error: Malformed challenge path, D:\freeCodeCamp\curriculum\challenges\english\10-coding-interview-prep\project-euler\problem-99-largest-exponential.english.md unable to parse.
at getEnglishPath (D:\freeCodeCamp\curriculum\getChallenges.js:187:11)
at createChallenge (D:\freeCodeCamp\curriculum\getChallenges.js:134:29)
at buildCurriculum (D:\freeCodeCamp\curriculum\getChallenges.js:89:27)
at EventEmitter.<anonymous> (D:\freeCodeCamp\curriculum\getChallenges.js:47:9)
at EventEmitter.emit (D:\freeCodeCamp\curriculum\node_modules\eventemitter3\index.js:181:35)
at Object.filter (D:\freeCodeCamp\curriculum\node_modules\readdirp-walk\readdirp.js:72:15)
at processFilter (D:\freeCodeCamp\curriculum\node_modules\walk-filtered\index.js:23:91)
at D:\freeCodeCamp\curriculum\node_modules\walk-filtered\index.js:34:5
at FSReqCallback.oncomplete (fs.js:167:5)
(node:12300) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3324)
Hash: dee2b44895beb738d218
Version: webpack 4.43.0
Time: 5698ms
Built at: 08/24/2020 9:55:30 AM
Asset Size Chunks Chunk Names
enzyme-adapter.5e8beb474f92bc102f9e.js 206 bytes 2, 1 [emitted] [immutable] enzyme-adapter
enzyme-adapter.5e8beb474f92bc102f9e.js.map 115 bytes 2, 1 [emitted] [dev] enzyme-adapter
enzyme.2310780c3c1857ee6d57.js 198 bytes 1, 2 [emitted] [immutable] enzyme
enzyme.2310780c3c1857ee6d57.js.map 107 bytes 1, 2 [emitted] [dev] enzyme
frame-runner.841d1da76cdc88e006de.js 182 KiB 3 [emitted] frame-runner
frame-runner.841d1da76cdc88e006de.js.map 868 KiB 3 [emitted] [dev] frame-runner
sass-compile.ae6262630f1e75267c30.js 1.36 KiB 4 [emitted] sass-compile
sass-compile.ae6262630f1e75267c30.js.map 5.89 KiB 4 [emitted] [dev] sass-compile
sass.sync.js 4.39 MiB [emitted] [big]
test-evaluator.fa3ab0fa2077b83ceb77.js 171 KiB 5, 6 [emitted] test-evaluator
test-evaluator.fa3ab0fa2077b83ceb77.js.map 882 KiB 5, 6 [emitted] [dev] test-evaluator
vendors~chai.db31e51f102dcec4957b.js 67.9 KiB 6 [emitted] [immutable] vendors~chai
vendors~chai.db31e51f102dcec4957b.js.map 423 KiB 6 [emitted] [dev] vendors~chai
vendors~enzyme-adapter.3aaf9b6445e01d8ad55b.js 227 KiB 7 [emitted] [immutable] vendors~enzyme-adapter
vendors~enzyme-adapter.3aaf9b6445e01d8ad55b.js.map 760 KiB 7 [emitted] [dev] vendors~enzyme-adapter
vendors~enzyme~enzyme-adapter.647f63bc09f7007d5cb7.js 538 KiB 0 [emitted] [immutable] [big] vendors~enzyme~enzyme-adapter
vendors~enzyme~enzyme-adapter.647f63bc09f7007d5cb7.js.map 2.22 MiB 0 [emitted] [dev] vendors~enzyme~enzyme-adapter
Entrypoint frame-runner = frame-runner.841d1da76cdc88e006de.js frame-runner.841d1da76cdc88e006de.js.map
Entrypoint sass-compile = sass-compile.ae6262630f1e75267c30.js sass-compile.ae6262630f1e75267c30.js.map
Entrypoint test-evaluator = test-evaluator.fa3ab0fa2077b83ceb77.js test-evaluator.fa3ab0fa2077b83ceb77.js.map
[322] (webpack)/buildin/global.js 472 bytes {0} {5} {6} [built]
ModuleConcatenation bailout: Module is not an ECMAScript module
[335] ./src/utils/format.js 203 bytes {5} [built]
[371] ./src/client/frame-runner.js 6.43 KiB {3} [built]
ModuleConcatenation bailout: Module uses eval()
[375] ./src/client/workers/sass-compile.js 756 bytes {4} [built]
ModuleConcatenation bailout: Module is not an ECMAScript module
[376] ./src/client/workers/test-evaluator.js 5.4 KiB {5} [built]
ModuleConcatenation bailout: Module uses eval()
[410] (webpack)/buildin/module.js 497 bytes {0} [built]
ModuleConcatenation bailout: Module is not an ECMAScript module
[499] ./util.inspect (ignored) 15 bytes {1} {2} [built]
ModuleConcatenation bailout: Module is not an ECMAScript module
[528] readable-stream (ignored) 15 bytes {1} {2} [built]
ModuleConcatenation bailout: Module is not an ECMAScript module
[537] util (ignored) 15 bytes {1} {2} [built]
ModuleConcatenation bailout: Module is not an ECMAScript module
[538] util (ignored) 15 bytes {1} {2} [built]
ModuleConcatenation bailout: Module is not an ECMAScript module
+ 851 hidden modules
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
vendors~enzyme~enzyme-adapter.647f63bc09f7007d5cb7.js (538 KiB)
sass.sync.js (4.39 MiB)
ECHO is on.
'Client workers ready.'
> @freecodecamp/[email protected] develop D:\freeCodeCamp\client
> node --inspect=0.0.0.0:9228 node_modules/gatsby-cli develop
Debugger listening on ws://0.0.0.0:9228/440efa63-30b8-4122-8d2b-18a4f742e410
For help, see: https://nodejs.org/en/docs/inspector
success open and validate gatsby-configs - 0.320s
ERROR
Error in "D:\freeCodeCamp\client\node_modules\gatsby-plugin-manifest\gatsby-node.js":
Something went wrong installing the "sharp" module
Cannot find module '../build/Release/sharp.node'
Require stack:
- D:\freeCodeCamp\client\node_modules\sharp\lib\constructor.js
- D:\freeCodeCamp\client\node_modules\sharp\lib\index.js
- D:\freeCodeCamp\client\node_modules\gatsby-plugin-manifest\safe-sharp.js
- D:\freeCodeCamp\client\node_modules\gatsby-plugin-manifest\gatsby-node.js
- D:\freeCodeCamp\client\node_modules\gatsby\dist\bootstrap\resolve-module-exports.js
- D:\freeCodeCamp\client\node_modules\gatsby\dist\bootstrap\load-plugins\validate.js
- D:\freeCodeCamp\client\node_modules\gatsby\dist\bootstrap\load-plugins\load.js
- D:\freeCodeCamp\client\node_modules\gatsby\dist\bootstrap\load-plugins\index.js
- D:\freeCodeCamp\client\node_modules\gatsby\dist\bootstrap\index.js
- D:\freeCodeCamp\client\node_modules\gatsby\dist\commands\develop.js
- D:\freeCodeCamp\client\node_modules\gatsby-cli\lib\create-cli.js
- D:\freeCodeCamp\client\node_modules\gatsby-cli\lib\index.js
- Run "npm rebuild --verbose sharp" and look for errors
- Consult the installation documentation at https://sharp.pixelplumbing.com/install
- Search for this error at https://github.com/lovell/sharp/issues
Error: Something went wrong installing the "sharp" module
Cannot find module '../build/Release/sharp.node'
Require stack:
- D:\freeCodeCamp\client\node_modules\sharp\lib\constructor.js
- D:\freeCodeCamp\client\node_modules\sharp\lib\index.js
- D:\freeCodeCamp\client\node_modules\gatsby-plugin-manifest\safe-sharp.js
- D:\freeCodeCamp\client\node_modules\gatsby-plugin-manifest\gatsby-node.js
- D:\freeCodeCamp\client\node_modules\gatsby\dist\bootstrap\resolve-module-exp orts.js
- D:\freeCodeCamp\client\node_modules\gatsby\dist\bootstrap\load-plugins\valid ate.js
- D:\freeCodeCamp\client\node_modules\gatsby\dist\bootstrap\load-plugins\load. js
- D:\freeCodeCamp\client\node_modules\gatsby\dist\bootstrap\load-plugins\index .js
- D:\freeCodeCamp\client\node_modules\gatsby\dist\bootstrap\index.js
- D:\freeCodeCamp\client\node_modules\gatsby\dist\commands\develop.js
- D:\freeCodeCamp\client\node_modules\gatsby-cli\lib\create-cli.js
- D:\freeCodeCamp\client\node_modules\gatsby-cli\lib\index.js
- Run "npm rebuild --verbose sharp" and look for errors
- Consult the installation documentation at https://sharp.pixelplumbing.com/in stall
- Search for this error at https://github.com/lovell/sharp/issues
- constructor.js:34 Object.<anonymous>
[client]/[sharp]/lib/constructor.js:34:9
- v8-compile-cache.js:178 Module._compile
[client]/[v8-compile-cache]/v8-compile-cache.js:178:30
- loader.js:1178 Object.Module._extensions..js
internal/modules/cjs/loader.js:1178:10
- loader.js:1002 Module.load
internal/modules/cjs/loader.js:1002:32
- loader.js:901 Function.Module._load
internal/modules/cjs/loader.js:901:14
- loader.js:1044 Module.require
internal/modules/cjs/loader.js:1044:19
- v8-compile-cache.js:159 require
[client]/[v8-compile-cache]/v8-compile-cache.js:159:20
- index.js:3 Object.<anonymous>
[client]/[sharp]/lib/index.js:3:15
- v8-compile-cache.js:178 Module._compile
[client]/[v8-compile-cache]/v8-compile-cache.js:178:30
- loader.js:1178 Object.Module._extensions..js
internal/modules/cjs/loader.js:1178:10
- loader.js:1002 Module.load
internal/modules/cjs/loader.js:1002:32
- loader.js:901 Function.Module._load
internal/modules/cjs/loader.js:901:14
- loader.js:1044 Module.require
internal/modules/cjs/loader.js:1044:19
- v8-compile-cache.js:159 require
[client]/[v8-compile-cache]/v8-compile-cache.js:159:20
- safe-sharp.js:132 Object.<anonymous>
[client]/[gatsby-plugin-manifest]/safe-sharp.js:132:11
- v8-compile-cache.js:178 Module._compile
[client]/[v8-compile-cache]/v8-compile-cache.js:178:30
not finished load plugins - 0.453s
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @freecodecamp/[email protected] develop: `node --inspect=0.0.0.0:9228 node_modules/gatsby-cli develop`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @freecodecamp/[email protected] develop 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\OPT\AppData\Roaming\npm-cache\_logs\2020-08-24T16_55_34_623Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @freecodecamp/[email protected] develop:client: `cd ./client && npm run develop`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @freecodecamp/[email protected] develop:client 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\OPT\AppData\Roaming\npm-cache\_logs\2020-08-24T16_55_34_638Z-debug.log
ERROR: "develop:client" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @freecodecamp/[email protected] develop: `npm-run-all ensure-env -p develop:*`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @freecodecamp/[email protected] develop 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\OPT\AppData\Roaming\npm-cache\_logs\2020-08-24T16_55_34_763Z-debug.log
@RandellDawson
I think the warning is just that. I have not looked into it much but I believe the update to fsevents is most likely going to happen for all packages that have it as a dependency and is willing to drop some backward compatibility (not sure what the compatibility is with). My guess is there is some package (or package dependency) that is still using the old version and we would need to figure out if that warning can be fixed by updating that package (whatever it is).
I have gotten that error with sharp so many times. The only fix I have found is to remove it from the client
node_modules folder (if it is there) and run npm install from inside the client
folder.
@lasjorg What version of build-essentials did you end up installing? If you did not explicitly install it, do you know if what version (if any) is installed on your pc? I have tried both the 2015 and 2017 versions with no success.
Before this latest problem, I had not had any trouble with running npm ci
or npm run develop
in over a year.
FYI - I have even tried using PowerShell instead of my preferred Git-Bash and the same issue is there. I just tried your suggestion of removing the node_modules from just the client folder and running npm install
from within the client folder and that did not hange the errors for me.
I am seeing the following error:
Error: Malformed challenge path, D:\freeCodeCamp\curriculum\challenges\english\11-machine-learning-with-python\machine-learning-with-python-projects\book-recommendation-engine-us ing-knn.english.md unable to parse.
Also, I do notice the following when running npm install
from the client folder.
> [email protected] postinstall D:\freeCodeCamp\client\node_modules\gatsby-cli
> node scripts/postinstall.js
> [email protected] postinstall D:\freeCodeCamp\client\node_modules\gatsby
> node scripts/postinstall.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\gatsby\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\gatsby-source-filesystem\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\gatsby-page-utils\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
@ojeytonwilliams Do you have any insight to share?
FYI - I recently installed Ubuntu 18.04 on my machine, so now I can dual boot and use Linux for all of my FCC development. Running npm ci
and/or npm run develop
is over 10 times as fast for me compared to Windows and does not have any of the bugs I experience on the Windows.
What version of build-essentials did you end up installing?
Are you talking about the node-gyp stuff @raisedadead was talking about? I have not installed anything. I do not think it is related to the error you were seeing, as I said fsevents should not try to build on non-MacOS systems.
...and that did not hange the errors for me.
Are you saying doing that, did, or didn't work for you?
I am seeing the following error:
Not sure what that is about. I don't have any clue why the file name would have that space in it.
Also, I do notice the following when running
npm install
from the client folder.
That is a common warning, it can be ignored. It is mentioned in the README in the fsevents repo at the bottom.
FYI - I recently installed Ubuntu 18.04 on my machine, so now I can dual boot and use Linux for all of my FCC development. Running
npm ci
and/ornpm run develop
is over 10 times as fast for me compared to Windows and does not have any of the bugs I experience on the Windows.
I get the feeling the fCC code is not being tested and developed on as much on Windows as other platforms. But that seems to be a fairly common issue with open source projects.
I get the feeling the fCC code is not being tested and developed on as much on Windows as other platforms.
This is true. Partly because the target of the build (servers) run on Linux. So, while we would love to support development work on all machines/OS types, its easier said than done, sadly.
@Twaha-Rahman is working on the CI here: https://github.com/freeCodeCamp/freeCodeCamp/pull/39456, but GitHub actions don't really support Windows properly either, so it's harder than I'd realised to put even basic checks in place.
Thanks for sticking with that @Twaha-Rahman and please let us know if we can help at all.
@lasjorg I am saying even after trying to do what you mentioned, I am still having problems related to sharp
when I try to run npm run develop
. I no longer see an error running npm ci
after performing the actions you recommended though.
This is true. Partly because the target of the build (servers) run on Linux. So, while we would love to support development work on all machines/OS types, its easier said than done, sadly.
Yeah, I totally get that. As I said, it's not an uncommon issue.
Considering the size and scope of the project, fCC has done an amazing job making it as inclusive as it is. Not sure I can pick a better repo for anyone to make their first PR in. Keep up the great work.
@RandellDawson I'm actually not sure if I have seen that specific error with sharp, but it's not uncommon it seems.
Maybe try npm install --verbose sharp
and check the log.
I no longer see an error running
npm ci
after performing the actions you recommended though.
So I guess we should bump docsify-cli
to 4.4.1 and also push an updated version of the lock file after having run npm i jest
. Not sure what dependencies running jest install updates but doing that was the only way I was able to fix the error.
@RandellDawson Do you have C/C++ Build Tools installed in your Windows?
When you install Node.js in Windows, there is an option to install those.
(AFAIK sharp requires those tools, without those it spits out errors)
Btw... I have no problem when I run npm ci
and npm run develop
after following @lasjorg 's solution and applying #39454 .
Can you give another try after installing those tools and tell us how it goes?
@Twaha-Rahman Sure. I will do that now.
@Twaha-Rahman I started from scratch. I deleted the repo from my machine. I uninstalled Node and reinstalled using the same installation package you showed, using 12.18.3 LTS (which is what I had before). I checked the box to install the dependencies when the dialog box appeared. I then performed all the steps (including Lasorg's which fixed the npm ci issue). When I run npm run develop
, I am still getting the same exact errors as before. I noticed when I reinstalled Node and the extra dependencies, I noticed Python 3.8.5 was installed. I also have Python 2.7 installed, but I am wondering if the Python 3.8.5 is causing a problem.
I am still seeing 100s or 1000s of the following:
(node:14920) UnhandledPromiseRejectionWarning: Error: Malformed challenge path, D:\freecodecamp\curriculum\challenges\english\10-coding-interview-prep\project-euler\problem-99-largest-exponential.english.md unable to parse.
at getEnglishPath (D:\freecodecamp\curriculum\getChallenges.js:187:11)
at createChallenge (D:\freecodecamp\curriculum\getChallenges.js:134:29)
at buildCurriculum (D:\freecodecamp\curriculum\getChallenges.js:89:27)
at EventEmitter.<anonymous> (D:\freecodecamp\curriculum\getChallenges.js:47:9)
at EventEmitter.emit (D:\freecodecamp\curriculum\node_modules\eventemitter3\index.js:181:35)
at Object.filter (D:\freecodecamp\curriculum\node_modules\readdirp-walk\readdirp.js:72:15)
at processFilter (D:\freecodecamp\curriculum\node_modules\walk-filtered\index.js:23:91)
at D:\freecodecamp\curriculum\node_modules\walk-filtered\index.js:34:5
at FSReqCallback.oncomplete (fs.js:169:5)
(node:14920) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3324)
but I am wondering if the error at the bottom relating to the parsing of the challenge file offers any clue as to what the issue is:
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
vendors~enzyme~enzyme-adapter.647f63bc09f7007d5cb7.js (538 KiB)
sass.sync.js (4.39 MiB)
ECHO is on.
'Client workers ready.'
> @freecodecamp/[email protected] develop D:\freecodecamp\client
> node --inspect=0.0.0.0:9228 node_modules/gatsby-cli develop
Debugger listening on ws://0.0.0.0:9228/a7060493-7728-487f-8edd-67aba0270581
For help, see: https://nodejs.org/en/docs/inspector
success open and validate gatsby-configs - 0.364s
success load plugins - 0.967s
success onPreInit - 0.004s
success initialize cache - 0.017s
success copy gatsby files - 0.058s
success onPreBootstrap - 0.016s
success createSchemaCustomization - 0.020s
ERROR
UNHANDLED REJECTION Malformed challenge path, D:\freecodecamp\curriculum\challenges\english\12-certificates\scientific-computing-with-python-certificate\scientific-computing-with-python-certificate.english.md unable to parse.
Error: Malformed challenge path, D:\freecodecamp\curriculum\challenges\english \12-certificates\scientific-computing-with-python-certificate\scientific-compu ting-with-python-certificate.english.md unable to parse.
- getChallenges.js:187 getEnglishPath
D:/freecodecamp/curriculum/getChallenges.js:187:11
- getChallenges.js:134 createChallenge
D:/freecodecamp/curriculum/getChallenges.js:134:29
- getChallenges.js:89 buildCurriculum
D:/freecodecamp/curriculum/getChallenges.js:89:27
- getChallenges.js:47 EventEmitter.<anonymous>
D:/freecodecamp/curriculum/getChallenges.js:47:9
- index.js:181 EventEmitter.emit
[curriculum]/[eventemitter3]/index.js:181:35
- readdirp.js:72 Object.filter
[curriculum]/[readdirp-walk]/readdirp.js:72:15
- index.js:23 processFilter
[curriculum]/[walk-filtered]/index.js:23:91
- index.js:34
[curriculum]/[walk-filtered]/index.js:34:5
not finished source and transform nodes - 0.478s
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @freecodecamp/[email protected] develop: `node --inspect=0.0.0.0:9228 node_modules/gatsby-cli develop`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @freecodecamp/[email protected] develop 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\OPT\AppData\Roaming\npm-cache\_logs\2020-08-25T16_59_58_816Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @freecodecamp/[email protected] develop:client: `cd ./client && npm run develop`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @freecodecamp/[email protected] develop:client 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\OPT\AppData\Roaming\npm-cache\_logs\2020-08-25T16_59_58_837Z-debug.log
ERROR: "develop:client" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @freecodecamp/[email protected] develop: `npm-run-all ensure-env -p develop:*`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @freecodecamp/[email protected] develop 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\OPT\AppData\Roaming\npm-cache\_logs\2020-08-25T16_59_58_985Z-debug.log
Below are the settings for my user variables and system variables. What does yours look like? Should the Python 2.7 come before 3.8 in one or both of the PATH variables?
@RandellDawson The malformed challenge link error can be fixed by applying #39454
OK. I guess it was a combination of errors. Once I cherry-picked the commits on #39454 into a branch off master
where the changes @lasjorg suggested, everything is working again on my Windows machine.
@Twaha-Rahman Thanks for the help.
@lasjorg If you want to create a PR with your suggested bumps, I think we can get those changes merged quickly.