issue with npm run build - BABEL_OUTPUT is not a recognised commmand - npm

When I run npm run build I get this error:
> plugin-test#0.1.0 build-esm
> BABEL_OUTPUT=esm babel src --extensions ".ts,.tsx,.js,.jsx" --copy-files --out-dir esm
"BABEL_OUTPUT" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.
(translated from Russian: "BABEL_OUTPUT" is not a recognised internal or external command)
I've installed babel-core, babel-cli and babel-node and still get this error. I see the command that gets executed in my package.json:
"build-esm": "BABEL_OUTPUT=esm babel src --extensions \".ts,.tsx,.js,.jsx\" --copy-files --out-dir esm",
Any Ideas how to solve this?

Related

Failed running "npm run prepare"

Trying to generate a theia-extension using "yo generate-extension" but am facing an error when arriving to this instruction which is among the script
npm run prepare
where it will launch the electron-app and the browser-app. here's the error
$ lerna run prepare
lerna info version 2.4.0
hello-world-extension: > hello-world-extension#0.0.0 prepare
hello-world-extension: > yarn run clean && yarn run build
hello-world-extension: yarn run v1.22.19
hello-world-extension: warning package.json: No license field
hello-world-extension: $ rimraf lib
hello-world-extension: Done in 0.27s.
hello-world-extension: yarn run v1.22.19
hello-world-extension: warning package.json: No license field
hello-world-extension: $ tsc
hello-world-extension: Done in 4.82s.
browser-app: > browser-app#0.0.0 prepare
browser-app: > theia build --mode development
electron-app: > electron-app#0.0.0 prepare
electron-app: > theia build --mode development
browser-app: Failed to resolve module: msgpackr
browser-app: Failed to resolve module: socket.io
electron-app: RequestError: getaddrinfo ENOTFOUND github.com\n

Error when trying to do 'expo build:android'

In the Terminal I get the following error after running the expo build:android command:
Error: Can't find react-native in package.json dependencies
Error: react-native is not installed. Please run `npm install` or `yarn` in your project directory.
There is an error with your project. See above logs for information.Error: There is an error with your project. See above logs for information.
Terminal error picture
I have already tried to update npm version, npm install, and I also tried npm install -g eas-cli
Are there certain steps anyone thinks I should do?
Follow below guide
Delete node_modules folder in root folder
npm install (If you are using yarn use yarn install)

Error: Module `#nuxtjs/vuetify` not found. (v2.0.0-beta.2)

Because of fibers error on cPanel/CentOS/Cloudlinux servers, I'm using v2.0.0-beta.2 of #nuxtjs/vuetify in my Nuxt app.
But npm returns error on build or dev running.
No problem with v1.11.2, but the alpha and beta versions have error.
✖ Nuxt Fatal Error
Error: Module `#nuxtjs/vuetify` not found. Please ensure `#nuxtjs/vuetify` is in `devDependencies` and
installed. HINT: During build step, for npm/yarn, `NODE_ENV=production` or `--production` should NOT be
used.
package.json
"devDependencies": {
"#nuxtjs/vuetify": "^2.0.0-beta.2"
}
nuxt.config.js
buildModules: [
'#nuxtjs/vuetify'
]
I deleted the node_modules folder and re-runned the npm install and problem solved.
Go through the bellow commands
Delete node_modules
run npm i if you have previously npm installed on you machine otherwise run npm install then run npm i .
run npm run build
run npm run start
I tried Fred solution but didn't work out for me.
However I run this command npm install #nuxtjs/vuetify -D to install the vuetify component and the problem solved.

How to setup `react-native-web` after `react-native init`

I get several errors after following the guide on react-rative-web.
I first created a new project: react-native init test --version 0.55.4
Then I installed the dependencies:
yarn add --dev babel-loader url-loader webpack webpack-cli webpack-dev-server babel-plugin-react-native-web
yarn add react react-dom react-native-web
copied the index.web.js and web/webpack.config.js
After executing the command:
webpack-dev-server -d --config ./web/webpack.config.js --inline --hot --colors
I get the error:
ERROR in ./index.web.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Cannot find module 'react-art'
OK. So I installed the (optional?) module yarn add react-art
The next run printed:
ERROR in ./index.web.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Plugin 0 specified in "base" provided an invalid property of "createElement"
Now I don't know what to do. How can I fix this error (and maybe the following)?

How to run gulptask from package.json?

I am trying to run my gulp lint task in my npm script like this, part of the package.json:
"lint":"cd somedirectory && npm run gulp-lint"
"gulp":"gulp",
"gulp-lint": "gulp --lint"
When I run npm run lint I get this error:
missing script : gulp-lint
How can I call the gulp task lint?