Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
316 views
in Technique[技术] by (71.8m points)

node.js - Error We encountered an error while trying to load your site's gatsby-config

**Error gatsby develop in heroku:**

<pre>
021-01-22T18:14:36.038727+00:00 heroku[web.1]: Starting process with command `npm start`
2021-01-22T18:14:41.137348+00:00 app[web.1]: 
2021-01-22T18:14:41.137405+00:00 app[web.1]: > [email protected] start /app
2021-01-22T18:14:41.137405+00:00 app[web.1]: > gatsby develop
2021-01-22T18:14:41.137406+00:00 app[web.1]:

Linea de Error 2021-01-22T18:14:53.166221+00:00 app[web.1]: error We encountered an error while trying to load your site's gatsby-config. Please fix the error and try again. 2021-01-22T18:14:53.296671+00:00 app[web.1]: 2021-01-22T18:14:53.296673+00:00 app[web.1]: 2021-01-22T18:14:53.296675+00:00 app[web.1]: Error: Cannot find module 'ts-node' 2021-01-22T18:14:53.296676+00:00 app[web.1]: Require stack: 2021-01-22T18:14:53.296677+00:00 app[web.1]: - /app/gatsby-config.js 2021-01-22T18:14:53.296678+00:00 app[web.1]: - /app/node_modules/gatsby/dist/bootstrap/get-config-file.js 2021-01-22T18:14:53.296678+00:00 app[web.1]: - /app/node_modules/gatsby/dist/bootstrap/load-themes/index.js 2021-01-22T18:14:53.296679+00:00 app[web.1]: - /app/node_modules/gatsby/dist/services/initialize.js 2021-01-22T18:14:53.296680+00:00 app[web.1]: - /app/node_modules/gatsby/dist/services/index.js 2021-01-22T18:14:53.296687+00:00 app[web.1]: - /app/node_modules/gatsby/dist/state-machines/develop/services.js 2021-01-22T18:14:53.296688+00:00 app[web.1]: - /app/node_modules/gatsby/dist/state-machines/develop/index.js 2021-01-22T18:14:53.296688+00:00 app[web.1]: - /app/node_modules/gatsby/dist/commands/develop-process.js 2021-01-22T18:14:53.296689+00:00 app[web.1]: - /app/.cache/tmp-21-lq08bTdc7kWV

2021-01-22T18:14:53.296690+00:00 app[web.1]:
2021-01-22T18:14:53.296690+00:00 app[web.1]:   - loader.js:815 Function.Module._resolveFilename
2021-01-22T18:14:53.296691+00:00 app[web.1]:     internal/modules/cjs/loader.js:815:15
2021-01-22T18:14:53.296691+00:00 app[web.1]:
2021-01-22T18:14:53.296691+00:00 app[web.1]:   - loader.js:667 Function.Module._load
2021-01-22T18:14:53.296692+00:00 app[web.1]:     internal/modules/cjs/loader.js:667:27
2021-01-22T18:14:53.296692+00:00 app[web.1]:   
2021-01-22T18:14:53.296692+00:00 app[web.1]:   - loader.js:887 Module.require
2021-01-22T18:14:53.296693+00:00 app[web.1]:     internal/modules/cjs/loader.js:887:19
2021-01-22T18:14:53.296693+00:00 app[web.1]:
2021-01-22T18:14:53.296694+00:00 app[web.1]:   - v8-compile-cache.js:159 require
2021-01-22T18:14:53.296694+00:00 app[web.1]:     [app]/[gatsby]/[v8-compile-cache]/v8-compile-cache.js:159:20
2021-01-22T18:14:53.296694+00:00 app[web.1]:
2021-01-22T18:14:53.296695+00:00 app[web.1]:   - gatsby-config.js:8 Object.<anonymous>
2021-01-22T18:14:53.296695+00:00 app[web.1]:     /app/gatsby-config.js:8:1
2021-01-22T18:14:53.296696+00:00 app[web.1]:
2021-01-22T18:14:53.296696+00:00 app[web.1]:   - v8-compile-cache.js:178 Module._compile
2021-01-22T18:14:53.296697+00:00 app[web.1]:     [app]/[gatsby]/[v8-compile-cache]/v8-compile-cache.js:178:30
2021-01-22T18:14:53.296697+00:00 app[web.1]:
2021-01-22T18:14:53.296697+00:00 app[web.1]:   - loader.js:1027 Object.Module._extensions..js
2021-01-22T18:14:53.296698+00:00 app[web.1]:     internal/modules/cjs/loader.js:1027:10
2021-01-22T18:14:53.296698+00:00 app[web.1]:
2021-01-22T18:14:53.296698+00:00 app[web.1]:   - loader.js:863 Module.load
2021-01-22T18:14:53.296699+00:00 app[web.1]:     internal/modules/cjs/loader.js:863:32
2021-01-22T18:14:53.296699+00:00 app[web.1]:
2021-01-22T18:14:53.296700+00:00 app[web.1]:   - loader.js:708 Function.Module._load
2021-01-22T18:14:53.296700+00:00 app[web.1]:     internal/modules/cjs/loader.js:708:14
2021-01-22T18:14:53.296700+00:00 app[web.1]:
2021-01-22T18:14:53.296701+00:00 app[web.1]:   - loader.js:887 Module.require
2021-01-22T18:14:53.296701+00:00 app[web.1]:     internal/modules/cjs/loader.js:887:19
2021-01-22T18:14:53.296702+00:00 app[web.1]:
2021-01-22T18:14:53.296702+00:00 app[web.1]:   - v8-compile-cache.js:159 require
2021-01-22T18:14:53.296702+00:00 app[web.1]:     [app]/[gatsby]/[v8-compile-cache]/v8-compile-cache.js:159:20
2021-01-22T18:14:53.296703+00:00 app[web.1]:
2021-01-22T18:14:53.296703+00:00 app[web.1]:   - get-config-file.ts:30 getConfigFile
2021-01-22T18:14:53.296703+00:00 app[web.1]:     [app]/[gatsby]/src/bootstrap/get-config-file.ts:30:20
2021-01-22T18:14:53.296704+00:00 app[web.1]:
2021-01-22T18:14:53.296713+00:00 app[web.1]:   - initialize.ts:113 initialize
2021-01-22T18:14:53.296714+00:00 app[web.1]:     [app]/[gatsby]/src/services/initialize.ts:113:50
2021-01-22T18:14:53.296714+00:00 app[web.1]:
2021-01-22T18:14:53.296714+00:00 app[web.1]:   - interpreter.js:707 Interpreter.exec
2021-01-22T18:14:53.296715+00:00 app[web.1]:     [app]/[xstate]/lib/interpreter.js:707:27
2021-01-22T18:14:53.296715+00:00 app[web.1]:
2021-01-22T18:14:53.296715+00:00 app[web.1]:   - interpreter.js:210 Interpreter.execute
2021-01-22T18:14:53.296716+00:00 app[web.1]:     [app]/[xstate]/lib/interpreter.js:210:22
2021-01-22T18:14:53.296716+00:00 app[web.1]:
2021-01-22T18:14:53.296716+00:00 app[web.1]:   - interpreter.js:230 Interpreter.update
2021-01-22T18:14:53.296717+00:00 app[web.1]:     [app]/[xstate]/lib/interpreter.js:230:18
2021-01-22T18:14:53.296717+00:00 app[web.1]:
2021-01-22T18:14:53.296718+00:00 app[web.1]:
2021-01-22T18:14:53.320519+00:00 app[web.1]: not finished open and validate gatsby-configs - 0.294s
2021-01-22T18:14:56.369082+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-01-22T18:14:56.369495+00:00 app[web.1]: npm ERR! errno 1
2021-01-22T18:14:56.380986+00:00 app[web.1]: npm ERR! [email protected] start: `gatsby develop`
2021-01-22T18:14:56.381228+00:00 app[web.1]: npm ERR! Exit status 1
2021-01-22T18:14:56.381928+00:00 app[web.1]: npm ERR!
2021-01-22T18:14:56.382140+00:00 app[web.1]: npm ERR! Failed at the [email protected] start script.
2021-01-22T18:14:56.382346+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-01-22T18:14:56.391199+00:00 app[web.1]:
2021-01-22T18:14:56.391609+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-01-22T18:14:56.391808+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2021-01-22T18_14_56_383Z-debug.log
2021-01-22T18:14:56.499234+00:00 heroku[web.1]: Process exited with status 1
</pre>

2021-01-22T18:14:53.166221+00:00 app[web.1]: error We encountered an error while trying to load your site's gatsby-config. Please fix the error and try again.

please help!
question from:https://stackoverflow.com/questions/65850893/error-we-encountered-an-error-while-trying-to-load-your-sites-gatsby-config

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...