Here is the error I am getting, Can anyone tell me the fix. I wasted my 4 hours but nothing helped. I was trying to fix this using some of the solution given on stackoverflow, but not getting the exact solution. I am not very good at it as it was my first project and I am trying to run it using a tutorial. but Don't know where is the issue.
[npm] > tesTopper#0.0.1 ionic:serve C:\Users\dinka\Documents\ionic\tesTopper
[npm] > ionic-app-scripts serve "--host=0.0.0.0" "--port=8100"
[INFO] Waiting for connectivity with npm...
[INFO] Waiting for connectivity with npm...
[INFO] Waiting for connectivity with npm...
[INFO] Waiting for connectivity with npm...
[npm] [23:53:37] ionic-app-scripts 3.2.3
[npm] [23:53:37] watch started ...
[npm] [23:53:37] build dev started ...
[npm] [23:53:38] typescript error
[npm] Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom',
[npm] 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator',
[npm] 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol',
[npm] 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string',
[npm] 'es2017.intl', 'esnext.asynciterable'.
[npm] [23:53:38] ionic-app-script task: "serve"
[npm] [23:53:38] TypeError: Cannot read property 'replace' of null
[npm] TypeError: Cannot read property 'replace' of null
[npm] at Object.escapeHtml (C:\Users\dinka\Documents\ionic\tesTopper\node_modules\#ionic\app-scripts\dist\util\helpers.js:253:10)
[npm] at generateCodeBlock (C:\Users\dinka\Documents\ionic\tesTopper\node_modules\#ionic\app-scripts\dist\logger\logger-diagnostics.js:187:77)
[npm] at generateDiagnosticHtml (C:\Users\dinka\Documents\ionic\tesTopper\node_modules\#ionic\app-scripts\dist\logger\logger-diagnostics.js:179:12)
[npm] at Array.map (<anonymous>)
[npm] at Object.printDiagnostics (C:\Users\dinka\Documents\ionic\tesTopper\node_modules\#ionic\app-scripts\dist\logger\logger-diagnostics.js:15:39)
[npm] at getTsConfig (C:\Users\dinka\Documents\ionic\tesTopper\node_modules\#ionic\app-scripts\dist\transpile.js:322:34)
[npm] at Object.<anonymous> (C:\Users\dinka\Documents\ionic\tesTopper\node_modules\#ionic\app-scripts\dist\transpile.js:298:46)
[npm] at step (C:\Users\dinka\Documents\ionic\tesTopper\node_modules\#ionic\app-scripts\dist\transpile.js:32:23)
[npm] at Object.next (C:\Users\dinka\Documents\ionic\tesTopper\node_modules\#ionic\app-scripts\dist\transpile.js:13:53)
[npm] at C:\Users\dinka\Documents\ionic\tesTopper\node_modules\#ionic\app-scripts\dist\transpile.js:7:71
[npm] npm ERR! code ELIFECYCLE
[npm] npm ERR! errno 1
[npm] npm ERR! tesTopper#0.0.1 ionic:serve: `ionic-app-scripts serve "--host=0.0.0.0" "--port=8100"`
[npm] npm ERR! Exit status 1
[npm] npm ERR!
[npm] npm ERR! Failed at the tesTopper#0.0.1 ionic:serve script.
[npm] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Related
I am developing a site for my fantasy football site. I am pulling from my GitHub repository. I tried adding an environement setting of CI = false. I might have done this incorrectly. I had an initial error of Command "npm run build" exited with 1.
The logs for the error are listed below:
08:27:11.719 ✓ 3 modules transformed.
08:27:11.720 [vite-plugin-svelte] Unrecognized option 'enableSourcemap'
08:27:11.720 file: /vercel/path0/.svelte-kit/build/generated/root.svelte
08:27:11.720 > Unrecognized option 'enableSourcemap'
08:27:11.723 Error: Unrecognized option 'enableSourcemap'
08:27:11.723 at file:///vercel/path0/node_modules/svelte/compiler.mjs:31194:19
08:27:11.723 at Array.forEach (<anonymous>)
08:27:11.723 at validate_options (file:///vercel/path0/node_modules/svelte/compiler.mjs:31188:26)
08:27:11.723 at compile (file:///vercel/path0/node_modules/svelte/compiler.mjs:31232:5)
08:27:11.723 at compileSvelte2 (file:///vercel/path0/node_modules/#sveltejs/vite-plugin-svelte/dist/index.js:313:20)
08:27:11.724 at async Object.transform (file:///vercel/path0/node_modules/#sveltejs/vite-plugin-svelte/dist/index.js:1460:27)
08:27:11.759 npm ERR! code ELIFECYCLE
08:27:11.759 npm ERR! errno 1
08:27:11.765 npm ERR! league-page#1.2.6 build: `svelte-kit build`
08:27:11.765 npm ERR! Exit status 1
08:27:11.765 npm ERR!
08:27:11.765 npm ERR! Failed at the league-page#1.2.6 build script.
08:27:11.765 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
08:27:11.776
08:27:11.776 npm ERR! A complete log of this run can be found in:
08:27:11.777 npm ERR! /vercel/.npm/_logs/2021-11-11T14_27_11_766Z-debug.log
08:27:11.792 Error: Command "CI='' npm run build" exited with 1
Update:
I figured out where the Error: Command "CI='' npm run build" exited with 1 was coming from and fixed that. The initial error as I listed came back up
08:32:34.030 [vite-plugin-svelte] Unrecognized option 'enableSourcemap'
08:32:34.030 file: /vercel/path0/.svelte-kit/build/generated/root.svelte
08:32:34.031 > Unrecognized option 'enableSourcemap'
08:32:34.033 Error: Unrecognized option 'enableSourcemap'
08:32:34.033 at file:///vercel/path0/node_modules/svelte/compiler.mjs:31194:19
08:32:34.033 at Array.forEach (<anonymous>)
08:32:34.033 at validate_options (file:///vercel/path0/node_modules/svelte/compiler.mjs:31188:26)
08:32:34.033 at compile (file:///vercel/path0/node_modules/svelte/compiler.mjs:31232:5)
08:32:34.034 at compileSvelte2 (file:///vercel/path0/node_modules/#sveltejs/vite-plugin-svelte/dist/index.js:313:20)
08:32:34.034 at async Object.transform (file:///vercel/path0/node_modules/#sveltejs/vite-plugin-svelte/dist/index.js:1460:27)
08:32:34.068 npm ERR! code ELIFECYCLE
08:32:34.068 npm ERR! errno 1
08:32:34.072 npm ERR! league-page#1.2.6 build: `svelte-kit build`
08:32:34.072 npm ERR! Exit status 1
08:32:34.072 npm ERR!
08:32:34.072 npm ERR! Failed at the league-page#1.2.6 build script.
08:32:34.072 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
08:32:34.085
08:32:34.086 npm ERR! A complete log of this run can be found in:
08:32:34.086 npm ERR! /vercel/.npm/_logs/2021-11-11T14_32_34_073Z-debug.log
08:32:34.101 Error: Command "npm run build" exited with 1
Not sure what version of Svelte you're using, but try installing v3.44.0:
npm install svelte#3.44.0
See here for a very similar issue:
The latest version of SvelteKit now has a peerdependency on Svelte 3.44.0, which introduced the enableSourcemap option.
https://github.com/sveltejs/kit/issues/2635#issuecomment-945996984
I'm following this realm tutorial and having trouble with realm-cli installation. I'm running
sudo npm install -g mongodb-realm-cli ,
which gives me the following error:
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
/usr/local/bin/realm-cli -> /usr/local/lib/node_modules/mongodb-realm-cli/wrapper.js
> mongodb-realm-cli#2.1.0 install /usr/local/lib/node_modules/mongodb-realm-cli
> node install.js
downloading "realm-cli" from "https://s3.amazonaws.com/realm-clis/realm_cli_rhel70_97239c6794575bad1486a178501366cea7e7d399_21_08_16_19_49_31/macos-amd64/realm-cli"
failed to download Realm CLI: Error: EACCES: permission denied, open '/usr/local/lib/node_modules/mongodb-realm-cli/realm-cli'
at Object.openSync (fs.js:498:3)
at /usr/local/lib/node_modules/mongodb-realm-cli/install.js:62:24
at new Promise (<anonymous>)
at requstBinary (/usr/local/lib/node_modules/mongodb-realm-cli/install.js:56:10)
at Object.<anonymous> (/usr/local/lib/node_modules/mongodb-realm-cli/install.js:101:1)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
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) {
errno: -13,
syscall: 'open',
code: 'EACCES',
path: '/usr/local/lib/node_modules/mongodb-realm-cli/realm-cli'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mongodb-realm-cli#2.1.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mongodb-realm-cli#2.1.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
This is what I have so far:
node -v: 14.17.6,
npm -v: 6.14.15
P.S.: it works fine on Windows 10.
Thanks in advance!
I need help, I can not build my app, I get the following error:
[19:09:38] typescript: src/pages/sidemenu/sidemenu.ts, line: 24
[19:09:38] typescript: src/pages/sidemenu/sidemenu.ts, line: 25
[19:09:38] ionic-app-script task: "build"
[19:09:38] Error: Failed to transpile program
Error: Failed to transpile program
at new BuildError (/usr/src/app/node_modules/#ionic/app-scripts/dist/util/errors.js:16:28)
at /usr/src/app/node_modules/#ionic/app-scripts/dist/transpile.js:137:20
at Promise ()
at transpileWorker (/usr/src/app/node_modules/#ionic/app-scripts/dist/transpile.js:103:12)
at Object.transpile (/usr/src/app/node_modules/#ionic/app-scripts/dist/transpile.js:61:12)
at buildProject (/usr/src/app/node_modules/#ionic/app-scripts/dist/build.js:97:78)
at /usr/src/app/node_modules/#ionic/app-scripts/dist/build.js:47:16
at
npm info lifecycle payman#0.0.1~build: Failed to exec build script
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! payman#0.0.1 build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the payman#0.0.1 build script.
This is probably not a problem with npm. There is likely additional logging output above.
can anybody help me please??
Happens most of the time because of the version of #ionic/app-scripts try to remove the package and add it again using npm
Trying to get ionic conference app (https://github.com/driftyco/ionic-conference-app) working.
ionic 2.1.13
npm version: 3.10.8
node version: 6.9.1
cordova version: 6.4.0
ionic serve -l results in the following output:
ionic-conference-app# ionic:serve C:\data\app\mkb
ionic-app-scripts serve "-l"
[13:21:16] ionic-app-scripts 0.0.44
[13:21:16] watch started ...
[13:21:16] build dev started ...
[13:21:16] clean started ...
[13:21:16] clean finished in less than 1 ms
[13:21:16] copy started ...
[13:21:16] transpile started ...
events.js:160
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE 0.0.0.0:8100
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at Server._listen2 (net.js:1257:14)
at listen (net.js:1293:10)
at net.js:1403:9
at _combinedTickCallback (internal/process/next_tick.js:77:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program >
Files\nodejs\node_modules\npm\bin\npm-cli.js" "r
" "ionic:serve" "--" "-l"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! ionic-conference-app# ionic:serve: ionic-app-scripts serve "-l"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-conference-app# ionic:serve script 'ionic-app-
scripts serve "-l"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-conference-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts serve "-l"
npm ERR! You can get information on how to open an issue for this project with:
...
There was an error serving your Ionic application: There was an error with the spawned command: serve
Any ideas as to what has gone wrong?
Many thanks
I've just tried it and it was working for me. On the package.json, it's showing that it's using the latest rc3 ("ionic-angular": "2.0.0-rc.3-201611211919") so try to do the following:
Update your ionic CLI: npm install -g ionic
Delete your node folder and do again npm install
Now, what do you get with ionic serve ?
the error you get is
listen EADDRINUSE 0.0.0.0:8100
looks like the port 8100 is in use.
try running on a different port using
--port=8101
also you can change this value in the run.js file
The error suggests to me that the port is in use already.
In my case I closed my browser instances connected to my Ionic app and also closed down my other VS Code Ionic projects and tried running the ionic serve command again and this appeared to resolve the problem.
I build an hybrid app using Ionic 2.
I got a windows pc and using mac virtual box for Xcode.
I can run the app on browser and android just fine in my windows.
problem is when I'm moving to mac I'm doing the same things on node JS and I get errors.
I used those lines in the terminal
ionic start/run/emulate/build Vme2
sudo ionic start/run/emulate/build Vme2
none works
this is the error I get
> ionic-hello-world# build /Users/amitaimazliah/Desktop/Vme2
> ionic-app-scripts build
[08:38:07] ionic-app-scripts 0.0.38
[08:38:07] build prod started ...
[08:38:07] clean started ...
[08:38:07] clean finished in 3 ms
[08:38:07] copy started ...
[08:38:07] ngc started ...
[08:38:07] copy finished in 262 ms
[08:38:07] build prod failed: spawn EACCES
[08:38:07] ionic-app-script task: "build"
[08:38:07] Error: spawn EACCES
npm ERR! Darwin 14.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! ionic-hello-world# build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world# build script 'ionic-app-scripts build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/amitaimazliah/Desktop/Vme2/npm-debug.log
Caught exception:
undefined
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
[08:38:07] lint started ...
[08:38:08] tslint: src/pages/home/home.ts, line: 57
Unused method: 'setNewPhotos'
L57: private setNewPhotos()
[08:38:08] lint finished in 1.27 s
(node:2376) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: channel closed
any ideas what am I doing wrong?
thanks
You have problem when build app.Can you try use this command '
ionic hooks add
Cheer !