БО
https://codepen.io/Bodfx/pen/dypwYZM?editors=0010
Size: a a a
БО
pl
❯ echo "import colors from 'colors/safe'; console.log(colors.green('+'))" > f.jsЯ могу запустить этот скрипт без всяких нпмов, модулей? просто запустить одиночный скрипт.
❯ node f.js
(node:4679) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
/mnt/c/Users//test/f.js:1
import colors from 'colors/safe'; console.log(colors.green('+'))
^^^^^^
SyntaxError: Cannot use import statement outside a module
И
j
❯ echo "import colors from 'colors/safe'; console.log(colors.green('+'))" > f.jsЯ могу запустить этот скрипт без всяких нпмов, модулей? просто запустить одиночный скрипт.
❯ node f.js
(node:4679) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
/mnt/c/Users//test/f.js:1
import colors from 'colors/safe'; console.log(colors.green('+'))
^^^^^^
SyntaxError: Cannot use import statement outside a module
.mjs
ЛХ
const saleImage = document.querySelector('#sale')
Uncaught TypeError: saleImage.dataset is not a function
???pl
.mjs
ЛХ
❯ echo "import colors from 'colors/safe'; console.log(colors.green('+'))" > f.jsЯ могу запустить этот скрипт без всяких нпмов, модулей? просто запустить одиночный скрипт.
❯ node f.js
(node:4679) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
/mnt/c/Users//test/f.js:1
import colors from 'colors/safe'; console.log(colors.green('+'))
^^^^^^
SyntaxError: Cannot use import statement outside a module
j
ЛХ
pl
pl
pl
ЛХ
pl
j
ЛХ
pl
pl