Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49315

Starting out errors (new computer, new installation, node-sass and python errors)

$
0
0

@loki9182 wrote:

I’ve just built a brand new computer and I’m getting errors when starting a new Ionic project. What am-I missing?

I’ve installed nodejs, angular cli, ionic cli, etc… here is my resulting ionic info

Ionic:

   ionic (Ionic CLI)             : 4.5.0 (C:\Users\lucch\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.0.0-beta.17
   @angular-devkit/build-angular : 0.10.7
   @angular-devkit/schematics    : 7.0.7
   @angular/cli                  : 7.0.7
   @ionic/angular-toolkit        : 1.2.0

System:

   NodeJS : v11.3.0 (C:\Program Files\nodejs\node.exe)
   npm    : 6.4.1
   OS     : Windows 10

I then start a new project as follow:

ionic start test blank --type angular

Here is the resulting stack:

C:\temp\ionic\test1>npm install

> node-sass@4.9.3 install C:\temp\ionic\test1\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-67_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-67_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g.

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> node-sass@4.9.3 postinstall C:\temp\ionic\test1\node_modules\node-sass
> node scripts/build.js

Building: C:\Program Files\nodejs\node.exe C:\temp\ionic\test1\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli   'C:\\temp\\ionic\\test1\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using node-gyp@3.8.0
gyp info using node@11.3.0 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\temp\ionic\test1\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\temp\ionic\test1\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\temp\ionic\test1\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\temp\ionic\test1\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\temp\ionic\test1\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\temp\ionic\test1\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:161:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\temp\ionic\test1\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\temp\ionic\test1\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\temp\ionic\test1\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\temp\ionic\test1\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\temp\ionic\test1\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\temp\ionic\test1\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:161:21)
gyp verb `which` failed   stack:
gyp verb `which` failed    'Error: not found: python2\n    at getNotFoundError (C:\\temp\\ionic\\test1\\node_modules\\which\\which.js:13:12)\n    at F (C:\\temp\\ionic\\test1\\node_modules\\which\\which.js:68:19)\n    at E (C:\\temp\\ionic\\test1\\node_modules\\which\\which.js:80:29)\n    at C:\\temp\\ionic\\test1\\node_modules\\which\\which.js:89:16\n    at
 C:\\temp\\ionic\\test1\\node_modules\\isexe\\index.js:42:5\n    at C:\\temp\\ionic\\test1\\node_modules\\isexe\\windows.js:36:5\n    at FSReqCallback.oncomplete (fs.js:161:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python C:\Users\lucch\AppData\Local\Programs\Python\Python37-32\python.EXE
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\lucch\AppData\Local\Programs\Python\Python37-32\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                                ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:978:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\temp\\ionic\\test1\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\temp\ionic\test1\node_modules\node-sass
gyp ERR! node -v v11.3.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.9.3 (node_modules\node-sass):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.9.3 postinstall: `node scripts/build.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

audited 49790 packages in 6.363s
found 0 vulnerabilities

I’ve downloaded and installed Python on my machine, added it to the path and it doesn’t make any difference. I might find a solution to this by messing around but I’m documenting it for newcomers to Ionic. If you follow the “getting started” procedures on the Ionic page, this should work out of the box and not require any messing around. I’ve been working on an app since Ionic v1 and rebuilt it many times (currently rebuilding it in the latest Ionic v4) so I don’t know what my old machine has installed to fix this problem anymore. What does a new machine need to have installed to make this work?

I’ll try rolling back to node 10 first and see what that does.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49315

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>