Title: cannot import config · Issue #14 · jscomplete/learn-fullstack-javascript · GitHub
Open Graph Title: cannot import config · Issue #14 · jscomplete/learn-fullstack-javascript
X Title: cannot import config · Issue #14 · jscomplete/learn-fullstack-javascript
Description: `C:\Users\hp\learn-fullstack-javascript>babel-node server.js (node:16052) 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 crea...
Open Graph Description: `C:\Users\hp\learn-fullstack-javascript>babel-node server.js (node:16052) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. (Use node --trace-warnin...
X Description: `C:\Users\hp\learn-fullstack-javascript>babel-node server.js (node:16052) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. (...
Opengraph URL: https://github.com/jscomplete/learn-fullstack-javascript/issues/14
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"cannot import config","articleBody":"`C:\\Users\\hp\\learn-fullstack-javascript\u003ebabel-node server.js\r\n(node:16052) Warning: To load an ES module, set \"type\": \"module\" in the package.json or use the .mjs extension.\r\n(Use node --trace-warnings ...to show where the warning was created)\r\nC:\\Users\\hp\\learn-fullstack-javascript\\server.js:1\r\nimport config, { nodeEnv, logStars } from '/config';\r\n^^^^^^\r\n\r\nSyntaxError: Cannot use import statement outside a module\r\n at Object.compileFunction (node:vm:352:18)\r\n at wrapSafe (node:internal/modules/cjs/loader:1033:15)\r\n at Module._compile (node:internal/modules/cjs/loader:1069:27)\r\n at loader (C:\\Users\\hp\\AppData\\Roaming\\npm\\node_modules\\babel-cli\\node_modules\\babel-register\\lib\\node.js:144:5)\r\n at Object.require.extensions.\u003ccomputed\u003e [as .js] (C:\\Users\\hp\\AppData\\Roaming\\npm\\node_modules\\babel-cli\\node_modules\\babel-register\\lib\\node.js:154:7)\r\n at Module.load (node:internal/modules/cjs/loader:981:32)\r\n at Function.Module._load (node:internal/modules/cjs/loader:822:12)\r\n at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)\r\n at Object.\u003canonymous\u003e (C:\\Users\\hp\\AppData\\Roaming\\npm\\node_modules\\babel-cli\\lib\\_babel-node.js:154:22)\r\n at Module._compile (node:internal/modules/cjs/loader:1105:14)`","author":{"url":"https://github.com/safal-305","@type":"Person","name":"safal-305"},"datePublished":"2022-08-03T10:46:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/14/learn-fullstack-javascript/issues/14"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5027e9dd-1786-f66e-2fff-97daf8e7fe47 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9108:C80D1:3E28A9:543C72:69771B8A |
| html-safe-nonce | 24bf533cda7c21c7db576187f524c11f3958ad2e931e192887505c18787774ea |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTA4OkM4MEQxOjNFMjhBOTo1NDNDNzI6Njk3NzFCOEEiLCJ2aXNpdG9yX2lkIjoiNTIwNzcxOTIzNDgyMDg0MDMzMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | bff1b9159c7d324105526ff4e0bc1996ee6fdc654c43298120869db609ca0139 |
| hovercard-subject-tag | issue:1327026413 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/jscomplete/learn-fullstack-javascript/14/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c21cf5735239569d2993986d303c3c04fc8d974188d0b0cf3addad98d80d4db0/jscomplete/learn-fullstack-javascript/issues/14 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c21cf5735239569d2993986d303c3c04fc8d974188d0b0cf3addad98d80d4db0/jscomplete/learn-fullstack-javascript/issues/14 |
| og:image:alt | `C:\Users\hp\learn-fullstack-javascript>babel-node server.js (node:16052) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. (Use node --trace-warnin... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | safal-305 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 01d198479908d09a841b2febe8eb105a81af2af7d81830960fe0971e1f4adc09 |
| turbo-cache-control | no-preview |
| go-import | github.com/jscomplete/learn-fullstack-javascript git https://github.com/jscomplete/learn-fullstack-javascript.git |
| octolytics-dimension-user_id | 22123180 |
| octolytics-dimension-user_login | jscomplete |
| octolytics-dimension-repository_id | 68946248 |
| octolytics-dimension-repository_nwo | jscomplete/learn-fullstack-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 68946248 |
| octolytics-dimension-repository_network_root_nwo | jscomplete/learn-fullstack-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f752335dbbea672610081196a1998e39aec5e14b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width