I am struggling to run my first ionic app, npm doesn’t seem to install the app-script files, what am I doing wrong?
For one thing, posting images of text instead of text.
Ionic is not ready for npm5. Uninstall your node8 and install an older version.
This command should fix the issue:
npm install -g @ionic/app-scripts@latest --save-dev
Thanks, I thought it was my Node version, but wasn’t sure, this confirms it. I will downgrade my node, but Im sure we can close this topic.
This won’t work (yet) on Windows with node8/npm5.
But in general you are right.
No need, we leave these open for future users that have the same problem.
I have a similar issue. I don’t have python, which I guess is fine but the rest? Here is what I get on terminal.
which failed code: ‘ENOENT’ }
gyp verb check python checking for Python executable “python” in the PATH
which succeeded python /usr/bin/python
gyp verb check python version
/usr/bin/python -c "import platform; print(platform.python_version());" returned: "2.7.10\n"
gyp verb get node dir no --target version specified, falling back to host node version: 8.9.3
gyp verb command install [ ‘8.9.3’ ]
gyp verb install input version string "8.9.3"
gyp verb install installing version: 8.9.3
gyp verb install --ensure was passed, so won’t reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got “installVersion” 9
gyp verb needs “installVersion” 9
gyp verb install version is good
gyp verb get node dir target node version installed: 8.9.3
gyp verb build dir attempting to create “build” dir: /usr/local/lib/node_modules/@ionic/app-scripts/node_modules/node-sass/build
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@ionic/app-scripts/node_modules/node-sass/build’
gyp ERR! System Darwin 17.4.0
gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/@ionic/app-scripts/node_modules/node-gyp/bin/node-gyp.js” “rebuild” “–verbose” “–libsass_ext=” “–libsass_cflags=” “–libsass_ldflags=” "–libsass_library="
gyp ERR! cwd /usr/local/lib/node_modules/@ionic/app-scripts/node_modules/node-sass
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! email@example.com postinstall:
npm ERR! Exit status 1
npm ERR! Failed at the firstname.lastname@example.org postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
That is what I ran with sudo on my terminal but still same exit with error 1.
Can’t run ionic serve or anything now.
Any idea how to fix this please.
Thanks for suggestion, but I downgraded from nodejs 9.11.1 to 6.14.4 and from npm 6.1.0 to 3.10.10 but I still see this:
[ERROR] ionic-app-scripts command not found.
It seems this email@example.com update from 4.2.1 is still a nightmare.
In my case I had set
NODE_ENV=production in my terminal.
To check value of NODE_ENV,
echo $NODE_ENV, change it back to development with