Skip to content

"[INFO] Looks like @ionic/app-scripts isn't installed in this project. This package is required for this command to work properly." is often wrong and doesn't work #3563

Description

@janpio

Description:

λ ionic serve
> ionic-app-scripts serve --address 0.0.0.0 --port 8101 --livereload-port 35730 --dev-logger-port 53704 --nobrowser
[app-scripts] C:\Projects\Stromzaehler\stromzaehler\node_modules\node-sass\lib\binding.js:13
[app-scripts]       throw new Error(errors.unsupportedEnvironment());
[app-scripts]       ^
[app-scripts] Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (64)
[app-scripts] For more information on which environments are supported please see:
[app-scripts] https://github.com/sass/node-sass/releases/tag/v4.5.3
[app-scripts]     at module.exports (C:\Projects\Stromzaehler\stromzaehler\node_modules\node-sass\lib\binding.js:13:13)
[app-scripts]     at Object.<anonymous> (C:\Projects\Stromzaehler\stromzaehler\node_modules\node-sass\lib\index.js:14:35)
[app-scripts]     at Module._compile (internal/modules/cjs/loader.js:689:30)
[app-scripts]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
[app-scripts]     at Module.load (internal/modules/cjs/loader.js:599:32)
[app-scripts]     at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
[app-scripts]     at Function.Module._load (internal/modules/cjs/loader.js:530:3)
[app-scripts]     at Module.require (internal/modules/cjs/loader.js:637:17)
[app-scripts]     at require (internal/modules/cjs/helpers.js:20:18)
[app-scripts]     at Object.<anonymous> (C:\Projects\Stromzaehler\stromzaehler\node_modules\@ionic\app-scripts\dist\core\bundle-components.js:6:16)

[INFO] Looks like @ionic/app-scripts isn't installed in this project.

       This package is required for this command to work properly.

? Install @ionic/app-scripts?

First this is obviously wrong - @ionic/app-scripts is installed and crashed because of an error in one of its dependencies.

But Answering Yes also didn't do anything:

? Install @ionic/app-scripts? Yes                                                                                                                 
> npm i -D -E @ionic/app-scripts                                                                                                                  
npm WARN deprecated object-keys@0.2.0: Please update to the latest object-keys                                                                    
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"
                                                                                                                                                  
+ @ionic/app-scripts@2.0.2                                                                                                                        
added 188 packages from 136 contributors, removed 18 packages, updated 170 packages, moved 2 packages and audited 5179 packages in 55.507s        
found 0 vulnerabilities                                                                                                                           
                                                                                                                                                  
> ionic-app-scripts serve --address 0.0.0.0 --port 8101 --livereload-port 35730 --dev-logger-port 53704 --nobrowser                               
[app-scripts] C:\Projects\Stromzaehler\stromzaehler\node_modules\node-sass\lib\binding.js:13                                                      
[app-scripts]       throw new Error(errors.unsupportedEnvironment());                                                                             
[app-scripts]       ^                                                                                                                             
[app-scripts] Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (64)                        
[app-scripts] For more information on which environments are supported please see:                                                                
[app-scripts] https://github.com/sass/node-sass/releases/tag/v4.5.3                                                                               
[app-scripts]     at module.exports (C:\Projects\Stromzaehler\stromzaehler\node_modules\node-sass\lib\binding.js:13:13)                           
[app-scripts]     at Object.<anonymous> (C:\Projects\Stromzaehler\stromzaehler\node_modules\node-sass\lib\index.js:14:35)                         
[app-scripts]     at Module._compile (internal/modules/cjs/loader.js:689:30)                                                                      
[app-scripts]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)                                                        
[app-scripts]     at Module.load (internal/modules/cjs/loader.js:599:32)                                                                          
[app-scripts]     at tryModuleLoad (internal/modules/cjs/loader.js:538:12)                                                                        
[app-scripts]     at Function.Module._load (internal/modules/cjs/loader.js:530:3)                                                                 
[app-scripts]     at Module.require (internal/modules/cjs/loader.js:637:17)                                                                       
[app-scripts]     at require (internal/modules/cjs/helpers.js:20:18)                                                                              
[app-scripts]     at Object.<anonymous> (C:\Projects\Stromzaehler\stromzaehler\node_modules\@ionic\app-scripts\dist\core\bundle-components.js:6:16
[ERROR] ionic-app-scripts command not found.                                                                                                                                                                                                                                              

This installed the same @ionic/app-scripts@2.0.2 that was already installed before.

Running npm install @ionic/app-scripts@latest manually fixed the problem for the next run of ionic serve.

My ionic info:
before:

λ ionic info
√ Gathering environment info - done!

Ionic:

   ionic (Ionic CLI)  : 4.1.2 (C:\nvm\v10.7.0\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.5.3
   @ionic/app-scripts : 2.0.2

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 7.1.1, ios 4.5.5
   Cordova Plugins       : no whitelisted plugins (8 plugins total)

System:

   Android SDK Tools : 26.1.1 (C:\Android)
   NodeJS            : v10.7.0 (C:\Program Files\nodejs\node.exe)
   npm               : 6.1.0
   OS                : Windows 10

after:

λ ionic info                                                        
√ Gathering environment info - done!                                
                                                                    
Ionic:                                                              
                                                                    
   ionic (Ionic CLI)  : 4.1.2 (C:\nvm\v10.7.0\node_modules\ionic)   
   Ionic Framework    : ionic-angular 3.5.3                         
   @ionic/app-scripts : 3.2.0                                       
                                                                    
Cordova:                                                            
                                                                    
   cordova (Cordova CLI) : 8.0.0                                    
   Cordova Platforms     : android 7.1.1, ios 4.5.5                 
   Cordova Plugins       : no whitelisted plugins (8 plugins total) 
                                                                    
System:                                                             
                                                                    
   Android SDK Tools : 26.1.1 (C:\Android)                          
   NodeJS            : v10.7.0 (C:\Program Files\nodejs\node.exe)   
   npm               : 6.1.0                                        
   OS                : Windows 10                                   

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions