Giter VIP home page Giter VIP logo

Comments (10)

safouane-ahmed-salah avatar safouane-ahmed-salah commented on July 19, 2024 1

That error most probably because you haven't yet set the environment variables

Make sure you have the environment variables available:

export SNACK_PORT=3011
export SNACK_SEGMENT_KEY=""
export SNACK_SENTRY_DSN=""
export SNACK_SERVER_HOST=snack.expo.test
export SNACK_SERVER_PROTOCOL=https
export API_SERVER_URL=https://staging.expo.io
export IMPORT_SERVER_URL=https://staging.snackager.expo.io

from snack-web.

R4M80MrX avatar R4M80MrX commented on July 19, 2024

same problem

from snack-web.

rahulmr avatar rahulmr commented on July 19, 2024

Is there any bypass for this? I am facing same issue on windows 10

from snack-web.

safouane-ahmed-salah avatar safouane-ahmed-salah commented on July 19, 2024

I think because of single quote in start:dev command. cmd does't support single quote.
try change package.json line 9 to this
"start:dev": "nodemon -e json,js,ts,tsx --watch src/server src/server/index.tsx --exec babel-node --extensions \".ts,.tsx\"",

from snack-web.

rahulmr avatar rahulmr commented on July 19, 2024

As replied on SO, now below error is coming.

D:\projects\snack\snack-web>npm run start:dev

> @expo/[email protected] prestart:dev D:\projects\snack\snack-web
> yarn domain

yarn run v1.19.1
$ hotel start && hotel add http://localhost:3011 --name snack.expo
Started http://localhost:2000
Create ~\.hotel\servers\snack.expo.json
Done in 1.59s.

> @expo/[email protected] start:dev D:\projects\snack\snack-web
> nodemon -e json,js,ts,tsx --watch src/server src/server/index.tsx --exec babel-node --extensions ".ts,.tsx"

[nodemon] 1.19.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching dir(s): src\server\**\*
[nodemon] watching extensions: json,js,ts,tsx
[nodemon] starting `babel-node src/server/index.tsx --extensions .ts,.tsx`
D:\projects\snack\snack-web\node_modules\nullthrows\nullthrows.js:9
  throw error;
  ^

Error: Got unexpected undefined
    at nullthrows (D:\projects\snack\snack-web\node_modules\nullthrows\nullthrows.js:7:15)
    at Object.<anonymous> (D:\projects\snack\snack-web\src\server/EmbeddedSnackScript.tsx:6:14)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Module._compile (D:\projects\snack\snack-web\node_modules\pirates\lib\index.js:99:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Object.newLoader [as .tsx] (D:\projects\snack\snack-web\node_modules\pirates\lib\index.js:104:7)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (D:\projects\snack\snack-web\src\server/routes.tsx:13:1)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Module._compile (D:\projects\snack\snack-web\node_modules\pirates\lib\index.js:99:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Object.newLoader [as .tsx] (D:\projects\snack\snack-web\node_modules\pirates\lib\index.js:104:7)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (D:\projects\snack\snack-web\src\server/index.tsx:13:1)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Module._compile (D:\projects\snack\snack-web\node_modules\pirates\lib\index.js:99:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Object.newLoader [as .tsx] (D:\projects\snack\snack-web\node_modules\pirates\lib\index.js:104:7)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at Object.<anonymous> (D:\projects\snack\snack-web\node_modules\@babel\node\lib\_babel-node.js:174:21)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
[nodemon] app crashed - waiting for file changes before starting...

from snack-web.

rahulmr avatar rahulmr commented on July 19, 2024

Still not working :(

PS D:\projects\snack-web> .\start_web.bat

D:\projects\snack-web>set SNACK_PORT=3011

D:\projects\snack-web>set SNACK_SEGMENT_KEY=""

D:\projects\snack-web>set SNACK_SENTRY_DSN=""

D:\projects\snack-web>set SNACK_SERVER_HOST=snack.expo.test

D:\projects\snack-web>set SNACK_SERVER_PROTOCOL=https

D:\projects\snack-web>set API_SERVER_URL=https://staging.expo.io

D:\projects\snack-web>set IMPORT_SERVER_URL=https://staging.snackager.expo.io

D:\projects\snack-web>npm run start:dev

> @expo/[email protected] prestart:dev D:\projects\snack-web
> yarn domain

yarn run v1.19.1
$ hotel start && hotel add http://localhost:3011 --name snack.expo
Started http://localhost:2000
Create ~\.hotel\servers\snack.expo.json
Done in 1.11s.

> @expo/[email protected] start:dev D:\projects\snack-web
> nodemon -e json,js,ts,tsx --watch src/server src/server/index.tsx --exec babel-node --extensions ".ts,.tsx"

[nodemon] 1.19.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching dir(s): src\server\**\*
[nodemon] watching extensions: json,js,ts,tsx
[nodemon] starting `babel-node src/server/index.tsx --extensions .ts,.tsx`
D:\projects\snack-web\node_modules\raven\lib\utils.js:205
    throw new Error('Invalid Sentry DSN: ' + dsn);
    ^

Error: Invalid Sentry DSN: ""
    at Object.parseDSN (D:\projects\snack-web\node_modules\raven\lib\utils.js:205:11)
    at Raven.config (D:\projects\snack-web\node_modules\raven\lib\client.js:52:22)
    at Object.<anonymous> (D:\projects\snack-web\src\server/index.tsx:26:9)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Module._compile (D:\projects\snack-web\node_modules\pirates\lib\index.js:99:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Object.newLoader [as .tsx] (D:\projects\snack-web\node_modules\pirates\lib\index.js:104:7)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at Object.<anonymous> (D:\projects\snack-web\node_modules\@babel\node\lib\_babel-node.js:174:21)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
[nodemon] app crashed - waiting for file changes before starting...

from snack-web.

rahulmr avatar rahulmr commented on July 19, 2024

It worked finally by instead of double quotes "", I had to use single quotes ''. So silly windows :) . Thanks for your help @safwan39

from snack-web.

claretnnamocha avatar claretnnamocha commented on July 19, 2024

@rahulmr please check out the fork I made here and yet the code does not work. Please take a look and help me resolve it.

from snack-web.

wiem19 avatar wiem19 commented on July 19, 2024

export SNACK_PORT=3011
export SNACK_SEGMENT_KEY=""
export SNACK_SENTRY_DSN=""
export SNACK_SERVER_HOST=snack.expo.test
export SNACK_SERVER_PROTOCOL=https
export API_SERVER_URL=https://staging.expo.io
export IMPORT_SERVER_URL=https://staging.snackager.expo.io
export DEPLOY_ENVIRONMENT=""

worked for me

from snack-web.

IjzerenHein avatar IjzerenHein commented on July 19, 2024

Hi! I'm sorry this repository has not been maintained for some time. We have just moved the Snack web app to the new Snack monorepo at https://github.com/expo/snack

You can find instructions on how to run the Snack web-app here:
https://github.com/expo/snack/blob/main/CONTRIBUTING.md

The expo/snack-web repo will be archived, please report any issues in the new https://github.com/expo/snack repository.

from snack-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.