Open timofeysie opened 5 years ago
That's for the Ionic flavour.
tried:
npm install -g @ionic/app-scripts@latest --save-dev
Then this:
[npm] [20:35:23] build dev started ...
[npm] [20:35:23] 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] [20:35:23] ionic-app-script task: "serve"
[npm] [20:35:23] TypeError: Cannot read property 'replace' of null
[npm] TypeError: Cannot read property 'replace' of null
[npm] at Object.escapeHtml (/Users/tim/.nvm/versions/node/v12.9.1/lib/node_modules/@ionic/app-scripts/dist/util/helpers.js:253:10)
[npm] at generateCodeBlock (/Users/tim/.nvm/versions/node/v12.9.1/lib/node_modules/@ionic/app-scripts/dist/logger/logger-diagnostics.js:187:77)
[npm] at generateDiagnosticHtml (/Users/tim/.nvm/versions/node/v12.9.1/lib/node_modules/@ionic/app-scripts/dist/logger/logger-diagnostics.js:179:12)
[npm] at Array.map (<anonymous>)
[npm] at Object.printDiagnostics (/Users/tim/.nvm/versions/node/v12.9.1/lib/node_modules/@ionic/app-scripts/dist/logger/logger-diagnostics.js:15:39)
[npm] at getTsConfig (/Users/tim/.nvm/versions/node/v12.9.1/lib/node_modules/@ionic/app-scripts/dist/transpile.js:322:34)
[npm] at Object.<anonymous> (/Users/tim/.nvm/versions/node/v12.9.1/lib/node_modules/@ionic/app-scripts/dist/transpile.js:298:46)
[npm] at step (/Users/tim/.nvm/versions/node/v12.9.1/lib/node_modules/@ionic/app-scripts/dist/transpile.js:32:23)
[npm] at Object.next (/Users/tim/.nvm/versions/node/v12.9.1/lib/node_modules/@ionic/app-scripts/dist/transpile.js:13:53)
[npm] at /Users/tim/.nvm/versions/node/v12.9.1/lib/node_modules/@ionic/app-scripts/dist/transpile.js:7:71
[npm] npm ERR! code ELIFECYCLE
[npm] npm ERR! errno 1
[npm] npm ERR! photo-rc1@0.0.1 ionic:serve: `ionic-app-scripts serve "--host=localhost" "--port=8100"`
[npm] npm ERR! Exit status 1
This issue talks about one reason for this error. There is something extension that injects a script tag with no 'src' attribute to the page. One solution may be setting webpack-dev-server to 1.14.0 in package.json and then the running npm install again. Another solution could be Whitelisting the appropriate dev domains.
The solution shown above is somewhat out dated. It mentions rolling back to 1.4.0, but we have this in the package-lock:
"webpack-dev-server": "3.1.14",
[npm] sh: ionic-app-scripts: command not found [npm] npm ERR! file sh [npm] npm ERR! code ELIFECYCLE [npm] npm ERR! errno ENOENT [npm] npm ERR! syscall spawn [npm] npm ERR! photo-rc1@0.0.1 ionic:serve:
ionic-app-scripts serve "--host=localhost" "--port=8100"
[npm] npm ERR! spawn ENOENT [npm] npm ERR! Failed at the photo-rc1@0.0.1 ionic:serve script.