Comments (10)
You are right. It was building the development version. The NODE_ENV variable was not getting set correctly. I assigned isProd to be true and the app works in sheets now.
Node Version:
$ node -v v13.5.0
Thank you so much for your prompt help!
from react-google-apps-script.
@kavuribhavya Are you trying to run locally? If so follow the instructions for running locally in the readme https://github.com/enuchi/React-Google-Apps-Script#-new-local-development-
If you are just trying to see the built app run npm run deploy
to load the production environment.
from react-google-apps-script.
I'm trying to see the app run, and did npm run deploy
. That is the error i see when i do that.
Steps followed:
git clone https://github.com/enuchi/React-Google-Apps-Script.git
cd React-Google-Apps-Script
npm install
## Added a new script id to .clasp.json
npm run deploy
from react-google-apps-script.
It looks like it's running the development mode. Can you paste the scripts from your package file here?
from react-google-apps-script.
"scripts": {
"test": "test",
"login": "clasp login",
"setup": "rm -f .clasp.json & clasp create --type sheets --title 'My React Project' --rootDir ./dist",
"setup:use-id": "clasp setting rootDir dist & clasp setting scriptId",
"setup:https": "mkdir certs & mkcert -key-file ./certs/key.pem -cert-file ./certs/cert.pem localhost 127.0.0.1",
"build:dev": "set NODE_ENV=development & webpack",
"build": "set NODE_ENV=production & webpack",
"deploy:dev": "rm -rf dist & npm run build:dev & clasp push",
"deploy": "rm -rf dist & npm run build & clasp push",
"serve": "webpack-dev-server",
"start": "npm run deploy:dev & npm run serve"
},
from react-google-apps-script.
Should be double ampersand &&
to run in sequence. Can you try that?
Also I'll update soon to use cross-env to support all platforms for setting environment variables.
from react-google-apps-script.
If I use && or &, I see the below error,
Prompts can not be meaningfully rendered in non-TTY environments npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] deploy:
rm -rf dist && npm run build && clasp push`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] deploy 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\pgvq83\AppData\Roaming\npm-cache_logs\2020-09-01T21_24_05_974Z-debug.log
`
I'm running the commands individually in sequence(rm -rf dist
,$ export NODE_ENV=production
, webpack
, clasp push
) and they run without errors. Are there any compatibility issues with webpack and windows?
from react-google-apps-script.
Not that I'm aware of, although someone else pointed out another windows-related issue once. When you run them individually in sequence does the app work normally in sheets?
from react-google-apps-script.
No it doesn't but no errors on the command line. Although I see Entrypoint undefined (example output : Entrypoint main = main.js [0] ./appsscript.json 266 bytes {0} [built] Child SERVER: Hash: 150e0391a8610ca733a2 Time: 17077ms Built at: 09/01/2020 4:26:36 PM Asset Size Chunks Chunk Names code.js 6.68 KiB 0 [emitted] main Entrypoint main = code.js [0] ./src/server/index.js 631 bytes {0} [built] [2] ./src/server/ui.js 1.02 KiB {0} [built] [3] ./src/server/sheets.js 972 bytes {0} [built] + 1 hidden module Child CLIENT - Dialog Demo: Hash: 418ffc6926790822f8a7 Time: 24655ms Built at: 09/01/2020 4:26:44 PM Asset Size Chunks Chunk Names dialog-demo-impl.html 71.3 KiB [emitted] main.js 70.5 KiB main [emitted] main Entrypoint main = main.js [./node_modules/css-loader/dist/cjs.js!./src/client/dialog-demo/styles.css] 2.95 KiB {main} [built] [./src/client/dialog-demo/index.js] 240 bytes {main} [built] [./src/client/dialog-demo/styles.css] 532 bytes {main} [built] [./src/client/utils/server.js] 255 bytes {main} [built] [prop-types] external "PropTypes" 42 bytes {main} [built] [react] external "React" 42 bytes {main} [built] [react-dom] external "ReactDOM" 42 bytes {main} [built] [react-transition-group] external "ReactTransitionGroup" 42 bytes {main} [built] + 17 hidden modules Child html-webpack-plugin for "dialog-demo-impl.html": 1 asset Entrypoint undefined = dialog-demo-impl.html [./node_modules/html-webpack-plugin/lib/loader.js!./src/client/dialog-demo/index.html] 613 bytes {0} [built] + 3 hidden modules
)
from react-google-apps-script.
Looks like it is still building the development version. Can you print isProd
or env.process.NODE_ENV in the webpack file and check that it is picking up the environment variable correctly? Also, what version of node are you running?
from react-google-apps-script.
Related Issues (20)
- Can we migrate to vite? HOT 4
- White (blank) sidebar in Chrome when using Station wallet Chrome extension HOT 12
- How to use shadcn/ui HOT 1
- Issue: app is not loaded when I deploy, but does work with HMR HOT 2
- I want to use fast refresh without https
- How to deploy a google workspace addon using this? HOT 6
- Is it possible to pass initial state to React root component? HOT 3
- Uncaught ReferenceError: react is not defined HOT 1
- Typescript support for custom functions HOT 14
- Seeing "Running script" with "Cancel" and "Dismiss" instead of "Working" when executing opening the sidebar HOT 2
- Support for NextJs HOT 4
- Uncaught ReferenceError: emotionReact is not defined at 9291 (userCodeAppPanel:2:53729) HOT 5
- JSdocs Autocomplete not working as expected HOT 9
- ReferenceError: TextEncoder is not defined : how to diagnose a solution HOT 3
- TypeScript support for TableCell.setBold() TableCell.setFontSize() HOT 1
- Solution for webapp react-router sync with google.script.history (Client-side API) HOT 3
- How to expose an Appscript ServerFunction to the user for attaching as a script? HOT 3
- How to create custom functions in V3 version? HOT 5
- [Q] Any breaking change while migrating from V2 webpack to V3 vite? HOT 2
- Close dialog in Development Mode using google.script.host.close() HOT 1
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 react-google-apps-script.