Skip to content
This repository has been archived by the owner on Oct 16, 2019. It is now read-only.

'yarn develop' gets error with buildChallenges.js #31

Closed
tchaffee opened this issue May 1, 2018 · 7 comments
Closed

'yarn develop' gets error with buildChallenges.js #31

tchaffee opened this issue May 1, 2018 · 7 comments

Comments

@tchaffee
Copy link

tchaffee commented May 1, 2018

After a fresh clone of this project and a successful yarn install, I get the following error messages when running yarn develop:

success delete html and css files from previous builds — 0.008 s
error We encountered an error while trying to load your site's gatsby-config.js. Please fix the error and try again.


  Error: /home/tc/ws/learn/seed/buildChallenges.js:78
                ...file,
                ^^^
  SyntaxError: Unexpected token ...
@tchaffee tchaffee changed the title 'yarn develop' get error with buildChallenges.js 'yarn develop' gets error with buildChallenges.js May 1, 2018
@raisedadead
Copy link
Member

raisedadead commented May 2, 2018

Can't reproduce, can you please share your system config?

@tchaffee
Copy link
Author

tchaffee commented May 2, 2018

Ubuntu 16.04.4 LTS
npm v5.3.0
yarn v1.6.0
node v8.1.4

Let me know if there is any other info you need. Thanks!

@raisedadead
Copy link
Member

@Bouncey is on a similar setup, I guess. Can you try and bump your node to the latest LTS (8.11.x)

@tchaffee
Copy link
Author

tchaffee commented May 2, 2018

@raisedadead That got me past that error. Now I'm getting a new one.

...
success onPostBootstrap — 0.000 s

info bootstrap finished - 7.168 s

ERROR  Failed to compile with 3 errors                                                                                                                                                                                               17:44:25

These dependencies were not found:

These dependencies were not found:

* /home/tc/ws/learn/.cache/json/javascript-algorithms-and-data-structures-object-oriented-programming-use-closure-to-protect-properties-within-an-object-from-being-modified-externally.json in ./.cache/sync-requires.js
* /home/tc/ws/learn/.cache/json/javascript-algorithms-and-data-structures-functional-programming-use-the-every-method-to-check-that-every-element-in-an-array-meets-a-criteria.json in ./.cache/sync-requires.js
* /home/tc/ws/learn/.cache/json/javascript-algorithms-and-data-structures-functional-programming-use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-criteria.json in ./.cache/sync-requires.js

To install them, you can run: npm install --save /home/tc/ws/learn/.cache/json/javascript-algorithms-and-data-structures-object-oriented-programming-use-closure-to-protect-properties-within-an-object-from-being-modified-externally.json /home/tc/ws/learn/.cache/json/javascript-algorithms-and-data-structures-functional-programming-use-the-every-method-to-check-that-every-element-in-an-array-meets-a-criteria.json /home/tc/ws/learn/.cache/json/javascript-algorithms-and-data-structures-functional-programming-use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-criteria.json

I tried following the instructions, but I get this:

# npm install --save /home/tc/ws/learn/.cache/json/javascript-algorithms-and-data-structures-object-oriented-programming-use-closure-to-protect-properties-within-an-object-from-being-modified-externally.json

npm ERR! path /home/tc/ws/learn/.cache/json/javascript-algorithms-and-data-structures-object-oriented-programming-use-closure-to-protect-properties-within-an-object-from-being-modified-externally.json/package.json
npm ERR! code ENAMETOOLONG
npm ERR! errno -36
npm ERR! syscall open
npm ERR! ENAMETOOLONG: name too long, open '/home/tc/ws/learn/.cache/json/javascript-algorithms-and-data-structures-object-oriented-programming-use-closure-to-protect-properties-within-an-object-from-being-modified-externally.json/package.json'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/tc/.npm/_logs/2018-05-02T20_45_00_933Z-debug.log

Any ideas? Thanks!

@raisedadead
Copy link
Member

Hmm this looks something similar to #28

@scissorsneedfoodtoo
Copy link

Yes, I think that's the same problem I'm having. @tchaffee, is your /home directory encrypted by any chance?

If so, the problem is that the max filename length with encryption using eCryptfs, which I believe Ubuntu uses by default, is 143 characters. A temporary workaround is just to go into /seed/challenges and to find those three challenge titles and shorten them manually. Then you should be able to complete the build.

@tchaffee
Copy link
Author

tchaffee commented May 3, 2018

@scissorsneedfoodtoo Yes, encrypted home dir. Shortening the lesson descriptions worked for me. Thanks!

@tchaffee tchaffee closed this as completed May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants