You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to start with sudo, otherwise it doesn't run. This is the result:
sudo /etc/init.d/node-app start
Starting app ...
app started with pid 1096
The application doesn't respond on port 3000, and
sudo /etc/init.d/node-app status
app stopped, but pid file exists
the log reports:
cat log/app.log
(node:1096) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/home/ubuntu/KebraContest/src/index.js:1
import React from 'react';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:988:16)
at Module._compile (internal/modules/cjs/loader.js:1036:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47
And this sound strange to me, because the app runs nicely when started manually.
Any suggestion, please?
Thank you
The text was updated successfully, but these errors were encountered:
that is the result of using winbuntu.. you must import all the files using the unprivilegied account.. that means your nodejs assets files must be available to the non root user and also the project itselft..
then the script must change to the unpriivilegied user and run the application.. puff
Hi,
I tried to use your app, without success. It should be a matter of configuration I cannot get rid of.
I have a react application whose structure is as follow:
The index.js file is as follow:
The package.json is as follow:
Usually, I start the application with
npm start
and it runs fine.I config your app as follow:
I need to start with sudo, otherwise it doesn't run. This is the result:
The application doesn't respond on port 3000, and
the log reports:
And this sound strange to me, because the app runs nicely when started manually.
Any suggestion, please?
Thank you
The text was updated successfully, but these errors were encountered: