Comments (10)
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.
same problem
from snack-web.
Is there any bypass for this? I am facing same issue on windows 10
from snack-web.
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.
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.
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.
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.
@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.
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.
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)
- Embedding does not work HOT 1
- Using TypeORM in Snack makes Snack run out of memory in Chrome HOT 3
- Import Git Respository HOT 1
- Request failed with status 403: undefined
- Unable to resolve module 'module://fbjs/lib/areEqual.js' on snack HOT 1
- Custom fonts are not loaded HOT 3
- Modal not working as expected on Web HOT 2
- terser compress the code and breaks it HOT 1
- Can I lock orientation like through app.json? HOT 1
- Request failed with status 403 HOT 1
- can't import v36 expo? HOT 1
- Unable to import reanimated HOT 3
- No examples from React navigation docs working on Snack - Attempted to assign to readonly property HOT 6
- npm package imports with path not working HOT 1
- License File HOT 2
- web-player static script fetch failed (local cloned) HOT 2
- React error 130 is a nightmare to debug HOT 2
- Save button lights back up without user action right after a save HOT 1
- Importing repository from GitHub uses incorrect SDK version HOT 3
- I can not see web preview HOT 2
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 snack-web.